OpenMS  2.7.0
Public Member Functions | Protected Attributes | List of all members
MapAlignmentAlgorithmSpectrumAlignment::Compare Class Reference

inner class necessary for using the sort algorithm. More...

Collaboration diagram for MapAlignmentAlgorithmSpectrumAlignment::Compare:
[legend]

Public Member Functions

 Compare (bool b=false)
 Default constructor with an order flag. More...
 
bool operator() (const std::pair< std::pair< Int, float >, float > &c1, const std::pair< std::pair< Int, float >, float > &c2)
 overloaded operator() for comparing maps of maps std::pair<std::pair<Int,float>,float>. More...
 
bool operator() (const std::pair< float, float > &c1, const std::pair< float, float > &c2)
 overloaded operator() for comparing pairs of float, float std::pair<float,float>. More...
 

Protected Attributes

bool flag
 

Detailed Description

inner class necessary for using the sort algorithm.

Defines several overloaded operator() for usage with the std::sort algorithm

Experimental classes:
This algorithm is work in progress and might change.

Constructor & Destructor Documentation

◆ Compare()

Compare ( bool  b = false)
inlineexplicit

Default constructor with an order flag.

Member Function Documentation

◆ operator()() [1/2]

bool operator() ( const std::pair< float, float > &  c1,
const std::pair< float, float > &  c2 
)
inline

overloaded operator() for comparing pairs of float, float std::pair<float,float>.

If the order flag is false, an ascending order are returned else a descending. The comparison is done by the first argument of the map.

◆ operator()() [2/2]

bool operator() ( const std::pair< std::pair< Int, float >, float > &  c1,
const std::pair< std::pair< Int, float >, float > &  c2 
)
inline

overloaded operator() for comparing maps of maps std::pair<std::pair<Int,float>,float>.

If the order flag is false, the second argument of the outer map is selected. The output is an ascending order. If the order flag is true, the first argument of the inner class is selected to get a descending order.

Member Data Documentation

◆ flag

bool flag
protected