DistGeom::BoundsMatrix Class Reference

Class to store the distance bound. More...

#include <BoundsMatrix.h>

Inheritance diagram for DistGeom::BoundsMatrix:

RDNumeric::SquareMatrix< double > RDNumeric::Matrix< double >

List of all members.

Public Types

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


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 23 of file BoundsMatrix.h.


Member Typedef Documentation

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

Reimplemented from RDNumeric::Matrix< double >.

Definition at line 25 of file BoundsMatrix.h.


Constructor & Destructor Documentation

DistGeom::BoundsMatrix::BoundsMatrix ( unsigned int  N  )  [inline, explicit]

Definition at line 27 of file BoundsMatrix.h.

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

Definition at line 28 of file BoundsMatrix.h.


Member Function Documentation

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

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 44 of file BoundsMatrix.h.

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

Referenced by 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().

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 64 of file BoundsMatrix.h.

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

Referenced by 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 77 of file BoundsMatrix.h.

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

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

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 97 of file BoundsMatrix.h.

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


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

Generated on Tue Oct 7 06:10:11 2008 for RDCode by  doxygen 1.5.5