RDKit
Open-source cheminformatics and machine learning.
RDNumeric Namespace Reference

Namespaces

 Alignments
 
 EigenSolvers
 

Classes

class  Matrix
 A matrix class for general, non-square matrices. More...
 
class  SquareMatrix
 
class  SymmMatrix
 A symmetric matrix class. More...
 
class  Vector
 A class to represent vectors of numbers. More...
 

Typedefs

typedef Matrix< double > DoubleMatrix
 
typedef SquareMatrix< double > DoubleSquareMatrix
 
typedef SymmMatrix< double > DoubleSymmMatrix
 
typedef SymmMatrix< int > IntSymmMatrix
 
typedef SymmMatrix< unsigned int > UintSymmMatrix
 
typedef Vector< double > DoubleVector
 

Functions

template<class TYPE >
Matrix< TYPE > & multiply (const Matrix< TYPE > &A, const Matrix< TYPE > &B, Matrix< TYPE > &C)
 Matrix multiplication. More...
 
template<class TYPE >
Vector< TYPE > & multiply (const Matrix< TYPE > &A, const Vector< TYPE > &x, Vector< TYPE > &y)
 Matrix-Vector multiplication. More...
 
template<class TYPE >
SymmMatrix< TYPE > & multiply (const SymmMatrix< TYPE > &A, const SymmMatrix< TYPE > &B, SymmMatrix< TYPE > &C)
 SymmMatrix-SymmMatrix multiplication. More...
 
template<class TYPE >
Vector< TYPE > & multiply (const SymmMatrix< TYPE > &A, const Vector< TYPE > &x, Vector< TYPE > &y)
 SymmMatrix-Vector multiplication. More...
 
template<typename T >
double TanimotoSimilarity (const Vector< T > &v1, const Vector< T > &v2)
 returns the algebraic tanimoto similarity [defn' from JCIM 46:587-96 (2006)] More...
 

Typedef Documentation

Definition at line 323 of file Matrix.h.

Definition at line 85 of file SquareMatrix.h.

Definition at line 338 of file SymmMatrix.h.

Definition at line 295 of file Vector.h.

Definition at line 339 of file SymmMatrix.h.

typedef SymmMatrix<unsigned int> RDNumeric::UintSymmMatrix

Definition at line 340 of file SymmMatrix.h.

Function Documentation

template<class TYPE >
Matrix<TYPE>& RDNumeric::multiply ( const Matrix< TYPE > &  A,
const Matrix< TYPE > &  B,
Matrix< TYPE > &  C 
)

Matrix multiplication.

Multiply a Matrix A with a second Matrix B so the result is C = A*B

Parameters
Athe the first Matrix used in the multiplication
Bthe Matrix by which to multiply
CMatrix to use for the results
Returns
the results of multiplying A by B. This is just a reference to C.

Definition at line 254 of file Matrix.h.

References RDKit::Drawing::C, CHECK_INVARIANT, RDNumeric::Matrix< TYPE >::getData(), RDNumeric::Matrix< TYPE >::numCols(), and RDNumeric::Matrix< TYPE >::numRows().

template<class TYPE >
SymmMatrix<TYPE>& RDNumeric::multiply ( const SymmMatrix< TYPE > &  A,
const SymmMatrix< TYPE > &  B,
SymmMatrix< TYPE > &  C 
)

SymmMatrix-SymmMatrix multiplication.

Multiply SymmMatrix A with a second SymmMatrix B and write the result to C = A*B

Parameters
Athe first SymmMatrix
Bthe second SymmMatrix to multiply
CSymmMatrix to use for the results
Returns
the results of multiplying A by B. This is just a reference to C.

This method is reimplemented here for efficiency reasons (we basically don't want to use getter and setter functions)

Definition at line 261 of file SymmMatrix.h.

References RDKit::Drawing::C, CHECK_INVARIANT, RDNumeric::SymmMatrix< TYPE >::getData(), and RDNumeric::SymmMatrix< TYPE >::numRows().

template<class TYPE >
Vector<TYPE>& RDNumeric::multiply ( const Matrix< TYPE > &  A,
const Vector< TYPE > &  x,
Vector< TYPE > &  y 
)

Matrix-Vector multiplication.

Multiply a Matrix A with a Vector x so the result is y = A*x

Parameters
Athe matrix used in the multiplication
xthe Vector by which to multiply
yVector to use for the results
Returns
the results of multiplying x by this This is just a reference to y.

Definition at line 301 of file Matrix.h.

References CHECK_INVARIANT, RDNumeric::Vector< TYPE >::getData(), RDNumeric::Matrix< TYPE >::getData(), RDNumeric::Matrix< TYPE >::numCols(), RDNumeric::Matrix< TYPE >::numRows(), and RDNumeric::Vector< TYPE >::size().

template<class TYPE >
Vector<TYPE>& RDNumeric::multiply ( const SymmMatrix< TYPE > &  A,
const Vector< TYPE > &  x,
Vector< TYPE > &  y 
)

SymmMatrix-Vector multiplication.

Multiply a SymmMatrix A with a Vector x so the result is y = A*x

Parameters
Athe SymmMatrix for multiplication
xthe Vector by which to multiply
yVector to use for the results
Returns
the results of multiplying x by A This is just a reference to y.

This method is reimplemented here for efficiency reasons (we basically don't want to use getter and setter functions)

Definition at line 312 of file SymmMatrix.h.

References CHECK_INVARIANT, RDNumeric::Vector< TYPE >::getData(), RDNumeric::SymmMatrix< TYPE >::getData(), RDNumeric::SymmMatrix< TYPE >::numRows(), and RDNumeric::Vector< TYPE >::size().

template<typename T >
double RDNumeric::TanimotoSimilarity ( const Vector< T > &  v1,
const Vector< T > &  v2 
)

returns the algebraic tanimoto similarity [defn' from JCIM 46:587-96 (2006)]

Definition at line 299 of file Vector.h.

References RDNumeric::Vector< TYPE >::dotProduct(), and RDNumeric::Vector< TYPE >::normL2Sq().