RDKit: DistGeom::BoundsMatrix Class Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
DistGeom::BoundsMatrix Class Reference

Class to store the distance bound. More...

`#include <BoundsMatrix.h>`

Inheritance diagram for DistGeom::BoundsMatrix:

## Public Types
typedef boost::shared_array< double > | DATA_SPTR
Public Types inherited from RDNumeric::Matrix< double >
typedef boost::shared_array< double > | DATA_SPTR

## Public Member Functions
| BoundsMatrix (unsigned int N)
| BoundsMatrix (unsigned int N, DATA_SPTR data)
double | getUpperBound (unsigned int i, unsigned int j) const
| Get the upper bound between points i and j.
void | setUpperBound (unsigned int i, unsigned int j, double val)
| Set the lower bound between points i and j.
void | setUpperBoundIfBetter (unsigned int i, unsigned int j, double val)
void | setLowerBound (unsigned int i, unsigned int j, double val)
| Set the lower bound between points i and j.
void | setLowerBoundIfBetter (unsigned int i, unsigned int j, double val)
double | getLowerBound (unsigned int i, unsigned int j) const
| Get the lower bound between points i and j.
bool | checkValid () const
Public Member Functions inherited from RDNumeric::SquareMatrix< double >
| SquareMatrix ()
| brief Square matrix of size N
| SquareMatrix (unsigned int N)
| SquareMatrix (unsigned int N, double val)
| SquareMatrix (unsigned int N, typename Matrix< double >::DATA_SPTR data)
SquareMatrix< double > & | operator*= (double scale) override
| Multiplication by a scalar.
virtual SquareMatrix< double > & | operator*= (const SquareMatrix< double > &B)
| In place matrix multiplication.
virtual SquareMatrix< double > & | transposeInplace ()
| In place matrix transpose.
| SquareMatrix ()
| brief Square matrix of size N
| SquareMatrix (unsigned int N)
| SquareMatrix (unsigned int N, double val)
| SquareMatrix (unsigned int N, typename Matrix< double >::DATA_SPTR data)
SquareMatrix< double > & | operator*= (double scale) override
| Multiplication by a scalar.
virtual SquareMatrix< double > & | operator*= (const SquareMatrix< double > &B)
| In place matrix multiplication.
virtual SquareMatrix< double > & | transposeInplace ()
| In place matrix transpose.
Public Member Functions inherited from RDNumeric::Matrix< double >
| Matrix (unsigned int nRows, unsigned int nCols)
| Initialize with a size.
| Matrix (unsigned int nRows, unsigned int nCols, double val)
| Initialize with a size and default value.
| Matrix (unsigned int nRows, unsigned int nCols, DATA_SPTR data)
| Initialize from a pointer.
| Matrix (const Matrix< double > &other)
| copy constructor
virtual | ~Matrix ()
unsigned int | numRows () const
| returns the number of rows
unsigned int | numCols () const
| returns the number of columns
unsigned int | getDataSize () const
virtual double | getVal (unsigned int i, unsigned int j) const
| returns a particular element of the matrix
virtual void | setVal (unsigned int i, unsigned int j, double val)
| sets a particular element of the matrix
virtual double | getValUnchecked (unsigned int i, unsigned int j) const
| returns a particular element of the matrix
virtual void | setValUnchecked (unsigned int i, unsigned int j, double val)
| sets a particular element of the matrix
virtual void | getRow (unsigned int i, Vector< double > &row) const
| returns a copy of a row of the matrix
virtual void | getCol (unsigned int i, Vector< double > &col) const
| returns a copy of a column of the matrix
double * | getData ()
| returns a pointer to our data array
const double * | getData () const
| returns a const pointer to our data array
Matrix< double > & | assign (const Matrix< double > &other)
| Copy operator.
virtual Matrix< double > & | operator+= (const Matrix< double > &other)
| Matrix addition.
virtual Matrix< double > & | operator-= (const Matrix< double > &other)
| Matrix subtraction.
virtual Matrix< double > & | operator/= (double scale)
| division by a scalar
virtual Matrix< double > & | transpose (Matrix< double > &transpose) const
| copies the transpose of this Matrix into another, returns the result
| Matrix (unsigned int nRows, unsigned int nCols)
| Initialize with a size.
| Matrix (unsigned int nRows, unsigned int nCols, double val)
| Initialize with a size and default value.
| Matrix (unsigned int nRows, unsigned int nCols, DATA_SPTR data)
| Initialize from a pointer.
| Matrix (const Matrix< double > &other)
| copy constructor
virtual | ~Matrix ()
unsigned int | numRows () const
| returns the number of rows
unsigned int | numCols () const
| returns the number of columns
unsigned int | getDataSize () const
virtual double | getVal (unsigned int i, unsigned int j) const
| returns a particular element of the matrix
virtual void | setVal (unsigned int i, unsigned int j, double val)
| sets a particular element of the matrix
virtual double | getValUnchecked (unsigned int i, unsigned int j) const
| returns a particular element of the matrix
virtual void | setValUnchecked (unsigned int i, unsigned int j, double val)
| sets a particular element of the matrix
virtual void | getRow (unsigned int i, Vector< double > &row) const
| returns a copy of a row of the matrix
virtual void | getCol (unsigned int i, Vector< double > &col) const
| returns a copy of a column of the matrix
double * | getData ()
| returns a pointer to our data array
const double * | getData () const
| returns a const pointer to our data array
Matrix< double > & | assign (const Matrix< double > &other)
| Copy operator.
virtual Matrix< double > & | operator+= (const Matrix< double > &other)
| Matrix addition.
virtual Matrix< double > & | operator-= (const Matrix< double > &other)
| Matrix subtraction.
virtual Matrix< double > & | operator/= (double scale)
| division by a scalar
virtual Matrix< double > & | transpose (Matrix< double > &transpose) const
| copies the transpose of this Matrix into another, returns the result

## Additional Inherited Members
Protected Member Functions inherited from RDNumeric::Matrix< double >
| Matrix ()
| Matrix ()
Protected Attributes inherited from RDNumeric::Matrix< double >
unsigned int | d_nRows
unsigned int | d_nCols
unsigned int | d_dataSize
DATA_SPTR | d_data
unsigned int | d_nRows
unsigned int | d_nCols
unsigned int | d_dataSize
DATA_SPTR | d_data

## Detailed Description

Class to store the distance bound.

Basically a N by N matrix with lower distance bounds on the lower traingle and upper bounds in the upper triangle

Definition at line 26 of file BoundsMatrix.h.

## Member Typedef Documentation

## ◆ DATA_SPTR

typedef boost::shared_array<double> DistGeom::BoundsMatrix::DATA_SPTR

Definition at line 29 of file BoundsMatrix.h.

## Constructor & Destructor Documentation

## ◆ BoundsMatrix() [1/2]

DistGeom::BoundsMatrix::BoundsMatrix | ( | unsigned int | N | ) |
| inlineexplicit

Definition at line 31 of file BoundsMatrix.h.

References RDNumeric::SquareMatrix< double >::SquareMatrix().

## ◆ BoundsMatrix() [2/2]

DistGeom::BoundsMatrix::BoundsMatrix | ( | unsigned int | N,
|  | DATA_SPTR | data )
| inline

Definition at line 33 of file BoundsMatrix.h.

References RDNumeric::SquareMatrix< double >::SquareMatrix().

## Member Function Documentation

## ◆ checkValid()

bool DistGeom::BoundsMatrix::checkValid | ( |  | ) | const
| inline

Do a simple check of the current bounds - i.e. all lower bounds are smaller than the existing upper bounds

Definition at line 94 of file BoundsMatrix.h.

References RDNumeric::Matrix< double >::d_nRows, getLowerBound(), and getUpperBound().

## ◆ getLowerBound()

double DistGeom::BoundsMatrix::getLowerBound | ( | unsigned int | i,
|  | unsigned int | j ) const
| inline

Get the lower bound between points i and j.

Definition at line 84 of file BoundsMatrix.h.

References RDNumeric::Matrix< double >::getVal().

Referenced by checkValid(), setLowerBoundIfBetter(), and setUpperBoundIfBetter().

## ◆ getUpperBound()

double DistGeom::BoundsMatrix::getUpperBound | ( | unsigned int | i,
|  | unsigned int | j ) const
| inline

Get the upper bound between points i and j.

Definition at line 37 of file BoundsMatrix.h.

References RDNumeric::Matrix< double >::getVal().

Referenced by checkValid(), setLowerBoundIfBetter(), and setUpperBoundIfBetter().

## ◆ setLowerBound()

void DistGeom::BoundsMatrix::setLowerBound | ( | unsigned int | i,
|  | unsigned int | j,
|  | double | val )
| inline

Set the lower bound between points i and j.

Definition at line 65 of file BoundsMatrix.h.

References CHECK_INVARIANT, and RDNumeric::Matrix< double >::setVal().

Referenced by setLowerBoundIfBetter().

## ◆ setLowerBoundIfBetter()

void DistGeom::BoundsMatrix::setLowerBoundIfBetter | ( | unsigned int | i,
|  | unsigned int | j,
|  | double | val )
| inline

Set the lower bound between points i and j only if it is better than previously existing value (i.e. the new value is larger)

Definition at line 76 of file BoundsMatrix.h.

References getLowerBound(), getUpperBound(), and setLowerBound().

## ◆ setUpperBound()

void DistGeom::BoundsMatrix::setUpperBound | ( | unsigned int | i,
|  | unsigned int | j,
|  | double | val )
| inline

Set the lower bound between points i and j.

Definition at line 46 of file BoundsMatrix.h.

References CHECK_INVARIANT, and RDNumeric::Matrix< double >::setVal().

Referenced by setUpperBoundIfBetter().

## ◆ setUpperBoundIfBetter()

void DistGeom::BoundsMatrix::setUpperBoundIfBetter | ( | unsigned int | i,
|  | unsigned int | j,
|  | double | val )
| inline

Set the upper bound between points i and j only if it is better than previously existing value (i.e. the new value is smaller)

Definition at line 57 of file BoundsMatrix.h.

References getLowerBound(), getUpperBound(), and setUpperBound().

The documentation for this class was generated from the following file:

- BoundsMatrix.h