RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDNumeric Namespace Reference

Namespaces

namespace  Alignments
 
namespace  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.
 
template<class TYPE >
Vector< TYPE > & multiply (const Matrix< TYPE > &A, const Vector< TYPE > &x, Vector< TYPE > &y)
 Matrix-Vector multiplication.
 
template<class TYPE >
SymmMatrix< TYPE > & multiply (const SymmMatrix< TYPE > &A, const SymmMatrix< TYPE > &B, SymmMatrix< TYPE > &C)
 SymmMatrix-SymmMatrix multiplication.
 
template<class TYPE >
Vector< TYPE > & multiply (const SymmMatrix< TYPE > &A, const Vector< TYPE > &x, Vector< TYPE > &y)
 SymmMatrix-Vector multiplication.
 
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)]
 

Typedef Documentation

◆ DoubleMatrix

Definition at line 326 of file Matrix.h.

◆ DoubleSquareMatrix

Definition at line 86 of file SquareMatrix.h.

◆ DoubleSymmMatrix

Definition at line 339 of file SymmMatrix.h.

◆ DoubleVector

Definition at line 296 of file Vector.h.

◆ IntSymmMatrix

Definition at line 340 of file SymmMatrix.h.

◆ UintSymmMatrix

typedef SymmMatrix<unsigned int> RDNumeric::UintSymmMatrix

Definition at line 341 of file SymmMatrix.h.

Function Documentation

◆ multiply() [1/4]

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 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 255 of file Matrix.h.

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

◆ multiply() [2/4]

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 302 of file Matrix.h.

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

◆ multiply() [3/4]

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 262 of file SymmMatrix.h.

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

◆ multiply() [4/4]

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 313 of file SymmMatrix.h.

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

◆ TanimotoSimilarity()

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 300 of file Vector.h.

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