OpenMS
|
Representation of a HPLC gradient. More...
#include <OpenMS/METADATA/Gradient.h>
Public Member Functions | |
Gradient ()=default | |
Constructor. More... | |
Gradient (const Gradient &)=default | |
Copy constructor. More... | |
Gradient (Gradient &&)=default | |
Move constructor. More... | |
~Gradient () | |
Destructor. More... | |
Gradient & | operator= (const Gradient &)=default |
Assignment operator. More... | |
Gradient & | operator= (Gradient &&) &=default |
Move assignment operator. More... | |
bool | operator== (const Gradient &source) const |
Equality operator. More... | |
bool | operator!= (const Gradient &source) const |
Equality operator. More... | |
void | addEluent (const String &eluent) |
Adds an eluent at the end of the eluent array. More... | |
void | clearEluents () |
removes all eluents More... | |
const std::vector< String > & | getEluents () const |
returns a const reference to the list of eluents More... | |
void | addTimepoint (Int timepoint) |
Adds a timepoint at the end of the timepoint array. More... | |
void | clearTimepoints () |
removes all timepoints More... | |
const std::vector< Int > & | getTimepoints () const |
returns a const reference to the list of timepoints More... | |
void | setPercentage (const String &eluent, Int timepoint, UInt percentage) |
sets the percentage of eluent eluent at timepoint timepoint More... | |
const std::vector< std::vector< UInt > > & | getPercentages () const |
returns a const reference to the percentages More... | |
UInt | getPercentage (const String &eluent, Int timepoint) const |
returns the percentage of an eluent at a timepoint More... | |
void | clearPercentages () |
sets all percentage values to 0 More... | |
bool | isValid () const |
checks if the percentages of all timepoints add up to 100% More... | |
Protected Attributes | |
std::vector< String > | eluents_ |
std::vector< Int > | times_ |
std::vector< std::vector< UInt > > | percentages_ |
Representation of a HPLC gradient.
It consists of several eluents and timepoints. Linear behaviour between timepoints is assumed.
|
default |
Constructor.
~Gradient | ( | ) |
Destructor.
void addEluent | ( | const String & | eluent | ) |
Adds an eluent at the end of the eluent array.
Exception::InvalidValue | is thrown if the same eluent name is used twice. |
void addTimepoint | ( | Int | timepoint | ) |
Adds a timepoint at the end of the timepoint array.
Exception::OutOfRange | is thrown if the new timepoint is before the last timepoint. |
void clearEluents | ( | ) |
removes all eluents
void clearPercentages | ( | ) |
sets all percentage values to 0
void clearTimepoints | ( | ) |
removes all timepoints
const std::vector<String>& getEluents | ( | ) | const |
returns a const reference to the list of eluents
returns the percentage of an eluent
at a timepoint
Exception::InvalidValue | is thrown if the eluent or timepoint is invalid. |
const std::vector<std::vector<UInt> >& getPercentages | ( | ) | const |
returns a const reference to the percentages
First dimension of the vector is the eluents, second dimension is the timepoints.
const std::vector<Int>& getTimepoints | ( | ) | const |
returns a const reference to the list of timepoints
bool isValid | ( | ) | const |
checks if the percentages of all timepoints add up to 100%
bool operator!= | ( | const Gradient & | source | ) | const |
Equality operator.
bool operator== | ( | const Gradient & | source | ) | const |
Equality operator.
sets the percentage of eluent eluent
at timepoint timepoint
Exception::InvalidValue | is thrown if the eluent, timepoint or percentage is invalid. |
|
protected |
|
protected |
|
protected |