Generated on Tue Dec 16 12:50:03 2008 for BIU-2.2.0 by doxygen 1.5.1

biu::IntervalEnergyFunction Class Reference

#include <DistanceEnergyFunction.hh>

Inheritance diagram for biu::IntervalEnergyFunction:

Inheritance graph
[legend]

Detailed Description

An distance based energy function that does a discretised energy evaluation. For each distance interval a fixed energy table is used.

Author:
Martin Mann

Definition at line 210 of file DistanceEnergyFunction.hh.

Public Member Functions

virtual size_t addInterval (const biu::EnergyMatrix &energies, const double upperBound)
virtual const Alphabet *const getAlphabet () const
virtual double getEnergy (const Alphabet::AlphElem &seq_i, const Alphabet::AlphElem &seq_j, const DblPoint &cor_i, const DblPoint &cor_j) const
virtual double getEnergy (const Alphabet::AlphElem &seq_i, const Alphabet::AlphElem &seq_j, const IntPoint &cor_i, const IntPoint &cor_j) const
virtual double getEnergy (const Alphabet::AlphElem &seq_i, const Alphabet::AlphElem &seq_j, const double &distance) const
virtual size_t getInterval (double distance) const
virtual const biu::EnergyMatrix
*const 
getIntervalMatrix (const size_t index) const
virtual double getIntervalMax (const size_t index) const
virtual size_t getIntervalNum (void) const
 IntervalEnergyFunction (const IntervalEnergyFunction &toCopy)
 IntervalEnergyFunction (const Alphabet *const alphabet)
bool operator!= (const DistanceEnergyFunction &cef2) const
bool operator== (const DistanceEnergyFunction &cef2) const
virtual ~IntervalEnergyFunction ()

Protected Attributes

const Alphabet *const alphabet
std::vector< const biu::EnergyMatrix * > energyMat
std::vector< double > intervalMax


Constructor & Destructor Documentation

biu::IntervalEnergyFunction::IntervalEnergyFunction ( const Alphabet *const  alphabet  ) 

Creates and initialises a new distance interval energy function.

Parameters:
alphabet the alphabet the energy function supports

Definition at line 107 of file DistanceEnergyFunction.cc.

biu::IntervalEnergyFunction::IntervalEnergyFunction ( const IntervalEnergyFunction toCopy  ) 

Copy construction

Parameters:
toCopy the object to copy

Definition at line 116 of file DistanceEnergyFunction.cc.

biu::IntervalEnergyFunction::~IntervalEnergyFunction (  )  [virtual]

Definition at line 130 of file DistanceEnergyFunction.cc.


Member Function Documentation

size_t biu::IntervalEnergyFunction::addInterval ( const biu::EnergyMatrix energies,
const double  upperBound 
) [virtual]

Adds a contact energy matrix to the energy function that is used for distance values that are greater than the upper bound of the last added interval and smaller or equal to the given upperBound.

Parameters:
energies the contact energy matrices to use for this interval NOTE: has to have the same dimensions as the used alphabet has elements!
upperBound the upper distance bound of this interval. NOTE: Has to be at higher than last upper bound so far!
Returns:
the index of this interval, i.e. the last interval index

Definition at line 208 of file DistanceEnergyFunction.cc.

const Alphabet *const biu::IntervalEnergyFunction::getAlphabet (  )  const [virtual]

Access to the alphabet this energy function is based on.

Returns:
the alphabet in use

Implements biu::DistanceEnergyFunction.

Definition at line 142 of file DistanceEnergyFunction.cc.

double biu::IntervalEnergyFunction::getEnergy ( const Alphabet::AlphElem seq_i,
const Alphabet::AlphElem seq_j,
const DblPoint cor_i,
const DblPoint cor_j 
) const [virtual]

Returns the energy contribution of two elements of the alphabet with given coordinates.

Parameters:
seq_i,seq_j have to be elements of the specified alphabet.
cor_i,cor_j the corresponding coordinates of the two monomers to evaluate
Returns:
the energy contribution

Implements biu::DistanceEnergyFunction.

Definition at line 168 of file DistanceEnergyFunction.cc.

double biu::IntervalEnergyFunction::getEnergy ( const Alphabet::AlphElem seq_i,
const Alphabet::AlphElem seq_j,
const IntPoint cor_i,
const IntPoint cor_j 
) const [virtual]

Returns the energy contribution of two elements of the alphabet with given coordinates.

Parameters:
seq_i,seq_j have to be elements of the specified alphabet.
cor_i,cor_j the corresponding coordinates of the two monomers to evaluate
Returns:
the energy contribution

Implements biu::DistanceEnergyFunction.

Definition at line 158 of file DistanceEnergyFunction.cc.

double biu::IntervalEnergyFunction::getEnergy ( const Alphabet::AlphElem seq_i,
const Alphabet::AlphElem seq_j,
const double &  distance 
) const [virtual]

Returns the energy contribution of two elements of the alphabet that are in a certain distance.

Parameters:
seq_i,seq_j have to be elements of the specified alphabet.
distance the distance of the two monomers to evaluate
Returns:
the energy contribution

Implements biu::DistanceEnergyFunction.

Definition at line 148 of file DistanceEnergyFunction.cc.

size_t biu::IntervalEnergyFunction::getInterval ( double  distance  )  const [virtual]

Access to the interval index of a given distance.

Parameters:
distance the distance to check the interval for
Returns:
the interval index the distance falls into OR UINT_MAX if the distance is higher than the highest distance handled

Definition at line 243 of file DistanceEnergyFunction.cc.

const biu::EnergyMatrix *const biu::IntervalEnergyFunction::getIntervalMatrix ( const size_t  index  )  const [virtual]

Access to the energy table used for the given interval.

Parameters:
index the index of the interval of intrest (has to be less than getIntervalNum())
Returns:
the energy table of the specified interval

Definition at line 237 of file DistanceEnergyFunction.cc.

double biu::IntervalEnergyFunction::getIntervalMax ( const size_t  index  )  const [virtual]

Access to the upper interval bound.

Parameters:
index the index of the interval of intrest (has to be less than getIntervalNum())
Returns:
the upper bound of the specified interval

Definition at line 231 of file DistanceEnergyFunction.cc.

size_t biu::IntervalEnergyFunction::getIntervalNum ( void   )  const [virtual]

Access to the number of intervals in use.

Returns:
the number of intervals

Definition at line 226 of file DistanceEnergyFunction.cc.

bool biu::IntervalEnergyFunction::operator!= ( const DistanceEnergyFunction cef2  )  const [virtual]

Implements biu::DistanceEnergyFunction.

Definition at line 202 of file DistanceEnergyFunction.cc.

bool biu::IntervalEnergyFunction::operator== ( const DistanceEnergyFunction cef2  )  const [virtual]

Implements biu::DistanceEnergyFunction.

Definition at line 179 of file DistanceEnergyFunction.cc.


Field Documentation

the alphabet that stores all allowed sequence elements

Definition at line 216 of file DistanceEnergyFunction.hh.

Contains the energy matrices in use for each interval.

Definition at line 219 of file DistanceEnergyFunction.hh.

std::vector< double > biu::IntervalEnergyFunction::intervalMax [protected]

upper distance bounds of the intervals

Definition at line 222 of file DistanceEnergyFunction.hh.


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