Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

BasePairFinder Class Template Reference

#include <OpenMS/ANALYSIS/MAPMATCHING/BasePairFinder.h>

Inheritance diagram for BasePairFinder:

FactoryProduct DefaultParamHandler SimplePairFinder

List of all members.


Detailed Description

template<typename MapT = FeatureMap< >>
class OpenMS::BasePairFinder< MapT >

The base class of all element pair finding algorithms.

This class defines the basic interface for all element pair finding algorithms. It works on two element maps (FeatureMap is the default map type, but you can also use a pointer map like DPeakConstReferenceArray), and a transformation defined for the second element map (if no transformation is given, the pairs are found in the two original maps). A element can be a DPeak, a DFeature, a ConsensusPeak or ConsensusFeature (wheras DFeature is the default element type).

Policy for copy constructor and assignment: element_map_ is maintained as pointer and taken shallow copy. But param_ is deep.

Public Types

enum  Maps { MODEL = 0, SCENE = 1 }
typedef MapT PointMapType
 Container for input elements.
typedef PointMapType::value_type PointType
 Type of elements considered here.
typedef DPosition< 2 > PositionType
 Traits type.
typedef DoubleReal QualityType
 Quality.
typedef DoubleReal IntensityType
typedef ElementPair< PointTypeElementPairType
 Type of element pairs.
typedef std::vector
< ElementPairType
ElementPairVectorType
 Container for generated element pairs.
typedef LinearMapping TransformationType
 Type of estimated transformation.

Public Member Functions

 BasePairFinder ()
 Constructor.
virtual ~BasePairFinder ()
 Destructor.
void setElementMap (UInt const index, const PointMapType &element_map)
const PointMapTypegetElementMap (UInt index) const
 Get element maps by arg (non-mutable).
void setElementPairs (ElementPairVectorType &element_pairs)
 Set element pair list.
const ElementPairVectorTypegetElementPairs () const
 Get element pair list (non-mutable).
void setTransformation (UInt dim, const TransformationType &trafo)
 Set transformation.
const TransformationTypegetTransformation (UInt dim) const
 Get transformation.
virtual int dumpElementPairs (const String &filename)
 Write a debug dump of element pairs, e.g. for viewing the result with Gnuplot. The details (e.g. output destination) are controlled by param_. Returns 0 upon success and -1 if no debug dump was requested according to param_. You might invoke this at the end of run() in derived classes.
virtual void findElementPairs ()=0
 Estimates the transformation for each grid cell.

Static Public Member Functions

static void registerChildren ()
 Register all derived classes here.

Protected Member Functions

Int computeGridCellIndex_ (const PositionType &pos, const Grid &grid) throw (Exception::InvalidValue)
 Given a position element positoon this method computes the grid cell that covers this point.

Protected Attributes

PointMapType const * element_map_ [2]
 Two maps of elements to be matched.
TransformationType transformation_ [2]
 Transformation in rt and mz dimension.
ElementPairVectorTypeelement_pairs_
 Vector of pairs of elements that have been identified by the element matcher.


Member Typedef Documentation

typedef MapT PointMapType

Container for input elements.

Reimplemented in DelaunayPairFinder, and SimplePairFinder.

typedef PointMapType::value_type PointType

Type of elements considered here.

Reimplemented in DelaunayPairFinder, and SimplePairFinder.

typedef DPosition< 2 > PositionType

Traits type.

Position

Reimplemented in DelaunayPairFinder, and SimplePairFinder.

typedef DoubleReal QualityType

Quality.

Reimplemented in DelaunayPairFinder, and SimplePairFinder.

typedef DoubleReal IntensityType

Reimplemented in DelaunayPairFinder, and SimplePairFinder.

typedef ElementPair< PointType > ElementPairType

Type of element pairs.

Reimplemented in DelaunayPairFinder, and SimplePairFinder.

typedef std::vector< ElementPairType > ElementPairVectorType

Container for generated element pairs.

Reimplemented in SimplePairFinder.

typedef LinearMapping TransformationType

Type of estimated transformation.

Reimplemented in SimplePairFinder.


Member Enumeration Documentation

enum Maps

Symbolic names for indices of element maps etc. This should make things more understandable and maintainable.

Enumerator:
MODEL 
SCENE 

Reimplemented in DelaunayPairFinder, and SimplePairFinder.


Constructor & Destructor Documentation

BasePairFinder (  )  [inline]

Constructor.

virtual ~BasePairFinder (  )  [inline, virtual]

Destructor.


Member Function Documentation

void setElementMap ( UInt const   index,
const PointMapType element_map 
) [inline]

const PointMapType& getElementMap ( UInt  index  )  const [inline]

Get element maps by arg (non-mutable).

void setElementPairs ( ElementPairVectorType element_pairs  )  [inline]

Set element pair list.

const ElementPairVectorType& getElementPairs (  )  const [inline]

Get element pair list (non-mutable).

void setTransformation ( UInt  dim,
const TransformationType trafo 
) [inline]

Set transformation.

const TransformationType& getTransformation ( UInt  dim  )  const [inline]

Get transformation.

void registerChildren (  )  [inline, static]

Register all derived classes here.

int dumpElementPairs ( const String filename  )  [inline, virtual]

Write a debug dump of element pairs, e.g. for viewing the result with Gnuplot. The details (e.g. output destination) are controlled by param_. Returns 0 upon success and -1 if no debug dump was requested according to param_. You might invoke this at the end of run() in derived classes.

The base class will treat parameter "debug:dump_element_pairs" as a string, namely the filename for the element pair data and append ".gp" to that filename for a gnuplot script.

virtual void findElementPairs (  )  [pure virtual]

Estimates the transformation for each grid cell.

Implemented in DelaunayPairFinder, and SimplePairFinder.

Int computeGridCellIndex_ ( const PositionType pos,
const Grid grid 
) throw (Exception::InvalidValue) [inline, protected]

Given a position element positoon this method computes the grid cell that covers this point.


Member Data Documentation

PointMapType const* element_map_[2] [protected]

Two maps of elements to be matched.

TransformationType transformation_[2] [protected]

Transformation in rt and mz dimension.

ElementPairVectorType* element_pairs_ [mutable, protected]

Vector of pairs of elements that have been identified by the element matcher.


The documentation for this class was generated from the following files:
Generated Tue Apr 1 15:36:41 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1