LocARNA-1.8.11
Public Types | Public Member Functions | List of all members
LocARNA::PatternPairMap Class Reference

manage a set of EPMs (PatternPair) More...

#include <exact_matcher.hh>

Public Types

typedef PatternPair selfValueTYPE
 PatternPair.
 
typedef PatternPairSelfValuePTR
 pointer to PatternPair
 
typedef std::multimap< int, SelfValuePTR, std::greater< int > > orderedMapTYPE
 ordered map type
 
typedef orderedMapTYPE::const_iterator orderedMapCITER
 const iterator for the map
 
typedef orderedMapTYPE::iterator orderedMapITER
 iterator for the map
 
typedef std::list< SelfValuePTRpatListTYPE
 list of patternPairs
 
typedef patListTYPE::iterator patListITER
 iterator for the list of PatternPairs
 
typedef patListTYPE::const_iterator patListCITER
 const iterator for the list of PatternPairs
 
typedef unordered_map< std::string, SelfValuePTR >::type PatternIdMapTYPE
 map type patternId -> pointer to PatternPair
 

Public Member Functions

 PatternPairMap ()
 Contructor.
 
 PatternPairMap (const PatternPairMap &myPairMap)
 
virtual ~PatternPairMap ()
 Destructor.
 
void add (const std::string &id, const SinglePattern &first, const SinglePattern &second, const std::string &structure, int score)
 adds a PatternPair consisting of two SinglePatterns to the PatternPairMap More...
 
void add (const SelfValuePTR value)
 adds a PatternPair to the PatternPairMap More...
 
void makeOrderedMap ()
 creates the ordered Map
 
void updateFromMap ()
 updates the PatternPairMap from the ordered Map
 
const PatternPairgetPatternPair (const std::string &id) const
 gets the PatternPair with the Id id More...
 
const SelfValuePTR getPatternPairPTR (const std::string &id) const
 gets the pointer to the PatternPair with the Id id More...
 
const patListTYPEgetList () const
 
const orderedMapTYPEgetOrderedMap () const
 
orderedMapTYPEgetOrderedMap2 ()
 
const int size () const
 
int getMapBases ()
 computes the number of mapped bases More...
 
int getMapEPMScore ()
 computes the score of the list of PatternPairs patternList More...
 
const int getMinPatternSize () const
 

Detailed Description

manage a set of EPMs (PatternPair)

Constructor & Destructor Documentation

LocARNA::PatternPairMap::PatternPairMap ( const PatternPairMap myPairMap)
inline

Copy Constructor

Parameters
myPairMapPatternPairMap

Member Function Documentation

void LocARNA::PatternPairMap::add ( const std::string &  id,
const SinglePattern first,
const SinglePattern second,
const std::string &  structure,
int  score 
)

adds a PatternPair consisting of two SinglePatterns to the PatternPairMap

Parameters
idId of the PatternPair
firstfirst pattern
secondsecond pattern
structurestructure of the PatternPair
scorescore of the PatternPair
void LocARNA::PatternPairMap::add ( const SelfValuePTR  value)

adds a PatternPair to the PatternPairMap

Parameters
valuepointer to the PatternPair
const PatternPairMap::patListTYPE & LocARNA::PatternPairMap::getList ( ) const

read access

Returns
list of PatternPairs
int LocARNA::PatternPairMap::getMapBases ( )

computes the number of mapped bases

Returns
the number of mapped bases in the patternList
int LocARNA::PatternPairMap::getMapEPMScore ( )

computes the score of the list of PatternPairs patternList

Returns
the sum of scores of all EPMs in the patternList
const int LocARNA::PatternPairMap::getMinPatternSize ( ) const
inline

read access

Returns
the minimum size of a Pattern
const PatternPairMap::orderedMapTYPE & LocARNA::PatternPairMap::getOrderedMap ( ) const

read access

Returns
ordered Map
PatternPairMap::orderedMapTYPE & LocARNA::PatternPairMap::getOrderedMap2 ( )

write access

Returns
ordered Map
const PatternPair & LocARNA::PatternPairMap::getPatternPair ( const std::string &  id) const

gets the PatternPair with the Id id

Parameters
idId of PatternPair
Returns
PatternPair with Id id
const PatternPairMap::SelfValuePTR LocARNA::PatternPairMap::getPatternPairPTR ( const std::string &  id) const

gets the pointer to the PatternPair with the Id id

Parameters
idId of PatternPair
Returns
pointer to the PatternPair with Id id
const int LocARNA::PatternPairMap::size ( ) const

read access

Returns
size of the idMap

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