Representation of a (putative) link between two Features, which stem from the same compound but have different charge (including different adduct ions (H+, Na+, ..). More...
#include <OpenMS/DATASTRUCTURES/ChargePair.h>
Public Member Functions | |
| virtual bool | operator== (const ChargePair &i) const |
| Equality operator. | |
| virtual bool | operator!= (const ChargePair &i) const |
| Equality operator. | |
Constructors and destructor | |
| ChargePair () | |
| Default constructor. | |
| ChargePair (const Size &index0, const Size &index1, const Int &charge0, const Int &charge1, const Compomer &compomer, const DoubleReal &mass_diff, const bool active) | |
| Constructor from map index, element index and Feature. | |
| ChargePair (const ChargePair &rhs) | |
| Copy constructor. | |
| ChargePair & | operator= (const ChargePair &rhs) |
| Assignment operator. | |
| virtual | ~ChargePair () |
| Destructor. | |
| Int | getCharge (UInt pairID) const |
| Returns the charge (for element 0 or 1). | |
| void | setCharge (UInt pairID, Int e) |
| Set the charge (for element 0 or 1). | |
| Size | getElementIndex (UInt pairID) const |
| Returns the element index (for element 0 or 1). | |
| void | setElementIndex (UInt pairID, Size e) |
| Set the element index (for element 0 or 1). | |
| const Compomer & | getCompomer () const |
| Returns the Id of the compomer that explains the mass difference. | |
| void | setCompomer (const Compomer &compomer) |
| Set the compomer id. | |
| DoubleReal | getMassDiff () const |
| Returns the mass difference. | |
| void | setMassDiff (DoubleReal mass_diff) |
| Sets the mass difference. | |
| DoubleReal | getEdgeScore () const |
| Returns the ILP edge score. | |
| void | setEdgeScore (DoubleReal score) |
| Sets the ILP edge score. | |
| bool | isActive () const |
| is this pair realized? | |
| void | setActive (const bool active) |
Protected Attributes | |
| Size | feature0_index_ |
| Int of the first element within the FeatureMap. | |
| Size | feature1_index_ |
| Int of the second element within the FeatureMap. | |
| Int | feature0_charge_ |
| Assumed charge of the first feature. | |
| Int | feature1_charge_ |
| Assumed charge of the second feature. | |
| Compomer | compomer_ |
| Compomer that explains the mass difference. | |
| DoubleReal | mass_diff_ |
| mass difference (after explanation by compomer) | |
| DoubleReal | score_ |
| Score of this edge used in ILP. | |
| bool | is_active_ |
| was this pair realized by ILP? | |
Representation of a (putative) link between two Features, which stem from the same compound but have different charge (including different adduct ions (H+, Na+, ..).
A ChargePair represents an edge between two Features and specifies their respective charge and adducts, so that when decharged they can be explained as stemming from the same compound.
| ChargePair | ( | ) | [inline] |
Default constructor.
| ChargePair | ( | const Size & | index0, | |
| const Size & | index1, | |||
| const Int & | charge0, | |||
| const Int & | charge1, | |||
| const Compomer & | compomer, | |||
| const DoubleReal & | mass_diff, | |||
| const bool | active | |||
| ) | [inline] |
Constructor from map index, element index and Feature.
| ChargePair | ( | const ChargePair & | rhs | ) | [inline] |
Copy constructor.
| virtual ~ChargePair | ( | ) | [inline, virtual] |
Destructor.
| const Compomer& getCompomer | ( | ) | const [inline] |
Returns the Id of the compomer that explains the mass difference.
| DoubleReal getEdgeScore | ( | ) | const [inline] |
Returns the ILP edge score.
| DoubleReal getMassDiff | ( | ) | const [inline] |
Returns the mass difference.
| bool isActive | ( | ) | const [inline] |
is this pair realized?
| virtual bool operator!= | ( | const ChargePair & | i | ) | const [inline, virtual] |
Equality operator.
| ChargePair& operator= | ( | const ChargePair & | rhs | ) | [inline] |
Assignment operator.
References ChargePair::compomer_, ChargePair::feature0_charge_, ChargePair::feature0_index_, ChargePair::feature1_charge_, ChargePair::feature1_index_, ChargePair::is_active_, ChargePair::mass_diff_, and ChargePair::score_.
| virtual bool operator== | ( | const ChargePair & | i | ) | const [inline, virtual] |
Equality operator.
References ChargePair::compomer_, ChargePair::feature0_charge_, ChargePair::feature0_index_, ChargePair::feature1_charge_, ChargePair::feature1_index_, ChargePair::is_active_, and ChargePair::mass_diff_.
| void setActive | ( | const bool | active | ) | [inline] |
| void setCompomer | ( | const Compomer & | compomer | ) | [inline] |
Set the compomer id.
| void setEdgeScore | ( | DoubleReal | score | ) | [inline] |
Sets the ILP edge score.
| void setMassDiff | ( | DoubleReal | mass_diff | ) | [inline] |
Sets the mass difference.
Compomer that explains the mass difference.
Referenced by ChargePair::operator=(), and ChargePair::operator==().
Int feature0_charge_ [protected] |
Assumed charge of the first feature.
Referenced by ChargePair::operator=(), and ChargePair::operator==().
Size feature0_index_ [protected] |
Int of the first element within the FeatureMap.
Referenced by ChargePair::operator=(), and ChargePair::operator==().
Int feature1_charge_ [protected] |
Assumed charge of the second feature.
Referenced by ChargePair::operator=(), and ChargePair::operator==().
Size feature1_index_ [protected] |
Int of the second element within the FeatureMap.
Referenced by ChargePair::operator=(), and ChargePair::operator==().
bool is_active_ [protected] |
was this pair realized by ILP?
Referenced by ChargePair::operator=(), and ChargePair::operator==().
DoubleReal mass_diff_ [protected] |
mass difference (after explanation by compomer)
Referenced by ChargePair::operator=(), and ChargePair::operator==().
DoubleReal score_ [protected] |
Score of this edge used in ILP.
Referenced by ChargePair::operator=().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:51 using doxygen 1.7.1 |