Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix Class Reference

Public Types

Member types
using BoundsMatrix = Eigen::MatrixXd
 

Public Member Functions

Special member functions
 DistanceBoundsMatrix ()
 Initializes nothing.
 
 DistanceBoundsMatrix (long unsigned N)
 Initializes the matrix with defaultLower and defaultUpper.
 
 DistanceBoundsMatrix (Eigen::MatrixXd matrix)
 Sets the underlying matrix as the argument.
 
template<typename PrivateGraph >
 DistanceBoundsMatrix (const PrivateGraph &inner, BoundsMatrix bounds)
 Constructs a bounds matrix from a graph and a bounds matrix. More...
 
Modifiers
bool setUpperBound (AtomIndex i, AtomIndex j, double newUpperBound)
 Smoothes the underlying matrix using smooth(Eigen::Ref<Eigen::MatrixXd>)
 
bool setLowerBound (AtomIndex i, AtomIndex j, double newLowerBound)
 Smoothes the underlying matrix using smooth(Eigen::Ref<Eigen::MatrixXd>)
 
void smooth ()
 Smoothes the underlying matrix using smooth(Eigen::Ref<Eigen::MatrixXd>)
 
Information
double upperBound (AtomIndex i, AtomIndex j) const
 Access to upper bound of unordered indices. More...
 
double lowerBound (AtomIndex i, AtomIndex j) const
 Access to lower bound of unordered indices. More...
 
unsigned boundInconsistencies () const
 Checks for cases in which the lower bound is greater than the upper bound. More...
 
const Eigen::MatrixXd & access () const
 Nonmodifiable access to bounds matrix. More...
 
Result< Eigen::MatrixXd > makeDistanceMatrix (Random::Engine &engine, Partiality partiality=Partiality::All) const noexcept
 Generate a distance matrix. More...
 
Eigen::MatrixXd makeSquaredBoundsMatrix () const
 Squares all bounds and returns a new matrix. More...
 
unsigned N () const
 Yields the number of particles. More...
 

Static Public Member Functions

Static member functions
static double & lowerBound (Eigen::Ref< Eigen::MatrixXd > matrix, const AtomIndex i, const AtomIndex j)
 Uses Floyd's algorithm to smooth the matrix. More...
 
static double & upperBound (Eigen::Ref< Eigen::MatrixXd > matrix, const AtomIndex i, const AtomIndex j)
 Uses Floyd's algorithm to smooth the matrix. More...
 
static void smooth (Eigen::Ref< Eigen::MatrixXd > matrix)
 Uses Floyd's algorithm to smooth the matrix. More...
 

Static Public Attributes

static constexpr double defaultLower = 0.0
 
static constexpr double defaultUpper = 100.0
 

Private Member Functions

double & lowerBound_ (const AtomIndex i, const AtomIndex j)
 
double & upperBound_ (const AtomIndex i, const AtomIndex j)
 

Private Attributes

Eigen::MatrixXd matrix_
 

Constructor & Destructor Documentation

template<typename PrivateGraph >
Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::DistanceBoundsMatrix ( const PrivateGraph inner,
BoundsMatrix  bounds 
)
inline

Constructs a bounds matrix from a graph and a bounds matrix.

Replaces default lower bounds with the sum of the elements' vdw radii.

Member Function Documentation

const Eigen::MatrixXd& Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::access ( ) const

Nonmodifiable access to bounds matrix.

Complexity \(\Theta(1)\)

unsigned Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::boundInconsistencies ( ) const

Checks for cases in which the lower bound is greater than the upper bound.

Complexity \(\Theta(N^2)\)

static double& Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::lowerBound ( Eigen::Ref< Eigen::MatrixXd >  matrix,
const AtomIndex  i,
const AtomIndex  j 
)
inlinestatic

Uses Floyd's algorithm to smooth the matrix.

Complexity \(\Theta(N^3)\)

double Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::lowerBound ( AtomIndex  i,
AtomIndex  j 
) const
inline

Access to lower bound of unordered indices.

Complexity \(\Theta(1)\)

Result<Eigen::MatrixXd> Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::makeDistanceMatrix ( Random::Engine engine,
Partiality  partiality = Partiality::All 
) const
noexcept

Generate a distance matrix.

Generates a distance matrix from the contained bounds without altering underlying state.

Complexity \(O(N^5)\)

Eigen::MatrixXd Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::makeSquaredBoundsMatrix ( ) const

Squares all bounds and returns a new matrix.

Complexity \(\Theta(N^2)\)

unsigned Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::N ( ) const

Yields the number of particles.

Complexity \(\Theta(1)\)

static void Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::smooth ( Eigen::Ref< Eigen::MatrixXd >  matrix)
static

Uses Floyd's algorithm to smooth the matrix.

Complexity \(\Theta(N^3)\)

static double& Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::upperBound ( Eigen::Ref< Eigen::MatrixXd >  matrix,
const AtomIndex  i,
const AtomIndex  j 
)
inlinestatic

Uses Floyd's algorithm to smooth the matrix.

Complexity \(\Theta(N^3)\)

double Scine::Molassembler::DistanceGeometry::DistanceBoundsMatrix::upperBound ( AtomIndex  i,
AtomIndex  j 
) const
inline

Access to upper bound of unordered indices.

Complexity \(\Theta(1)\)


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