Abstract class for 1D-models that are approximated using linear interpolation. More...
#include <OpenMS/TRANSFORMATIONS/FEATUREFINDER/InterpolationModel.h>
Public Types | |
| typedef DoubleReal | IntensityType |
| typedef DPosition< 1 > | PositionType |
| typedef DoubleReal | CoordinateType |
| typedef Math::LinearInterpolation < DoubleReal > | LinearInterpolation |
Public Member Functions | |
| InterpolationModel () | |
| Default constructor. | |
| InterpolationModel (const InterpolationModel &source) | |
| copy constructor | |
| virtual | ~InterpolationModel () |
| destructor | |
| virtual InterpolationModel & | operator= (const InterpolationModel &source) |
| assignment operator | |
| IntensityType | getIntensity (const PositionType &pos) const |
access model predicted intensity at position pos | |
| IntensityType | getIntensity (CoordinateType coord) const |
access model predicted intensity at position pos | |
| const LinearInterpolation & | getInterpolation () const |
| Returns the interpolation class. | |
| CoordinateType | getScalingFactor () const |
| get the scaling for the model | |
| virtual void | setOffset (CoordinateType offset) |
| set the offset of the model | |
| void | getSamples (SamplesType &cont) const |
| get reasonable set of samples from the model (i.e. for printing) | |
| virtual CoordinateType | getCenter () const |
| "center" of the model, particular definition (depends on the derived model) | |
| virtual void | setSamples () |
| set sample/supporting points of interpolation wrt params. | |
| void | setInterpolationStep (CoordinateType interpolation_step) |
| Set the interpolation step for the linear interpolation of the model. | |
| void | setScalingFactor (CoordinateType scaling) |
Protected Member Functions | |
| void | updateMembers_ () |
| This method is used to update extra member variables at the end of the setParameters() method. | |
Protected Attributes | |
| LinearInterpolation | interpolation_ |
| CoordinateType | interpolation_step_ |
| CoordinateType | scaling_ |
Abstract class for 1D-models that are approximated using linear interpolation.
Model wrapping LinearInterpolation for speed-up in calculation of predicted intensities Derived classes have to implement setSamples()
Parameters of this class are:| Name | Type | Default | Restrictions | Description |
|---|---|---|---|---|
| cutoff | float | 0 | Low intensity cutoff of the model. Peaks below this intensity are not considered part of the model. | |
| interpolation_step | float | 0.1 | Sampling rate for the interpolation of the model function | |
| intensity_scaling | float | 1 | Scaling factor used to adjust the model distribution to the intensities of the data |
| typedef DoubleReal CoordinateType |
Reimplemented from BaseModel< 1 >.
Reimplemented in EGHModel, BiGaussModel, EmgModel, ExtendedIsotopeModel, GaussModel, IsotopeModel, LmaGaussModel, and LmaIsotopeModel.
| typedef DoubleReal IntensityType |
Reimplemented from BaseModel< 1 >.
Reimplemented in ExtendedIsotopeModel, IsotopeModel, and LmaIsotopeModel.
| typedef DPosition<1> PositionType |
Reimplemented from BaseModel< 1 >.
| InterpolationModel | ( | ) | [inline] |
Default constructor.
| InterpolationModel | ( | const InterpolationModel & | source | ) | [inline] |
copy constructor
| virtual ~InterpolationModel | ( | ) | [inline, virtual] |
destructor
| virtual CoordinateType getCenter | ( | ) | const [inline, virtual] |
"center" of the model, particular definition (depends on the derived model)
Reimplemented in EGHModel, BiGaussModel, EmgModel, ExtendedIsotopeModel, GaussModel, IsotopeModel, LmaGaussModel, and LmaIsotopeModel.
| IntensityType getIntensity | ( | const PositionType & | pos | ) | const [inline] |
access model predicted intensity at position pos
Referenced by MaxLikeliFitter1D::fitOffset_(), and FeatureFinderAlgorithmMRM< PeakType, FeatureType >::run().
| IntensityType getIntensity | ( | CoordinateType | coord | ) | const [inline] |
access model predicted intensity at position pos
| const LinearInterpolation& getInterpolation | ( | ) | const [inline] |
Returns the interpolation class.
Referenced by MaxLikeliFitter1D::fitOffset_().
| void getSamples | ( | SamplesType & | cont | ) | const [inline, virtual] |
get reasonable set of samples from the model (i.e. for printing)
Implements BaseModel< 1 >.
| CoordinateType getScalingFactor | ( | ) | const [inline] |
get the scaling for the model
A scaling factor of scaling means that the area under the model equals scaling. Default is 1.
| virtual InterpolationModel& operator= | ( | const InterpolationModel & | source | ) | [inline, virtual] |
assignment operator
References InterpolationModel::interpolation_, InterpolationModel::interpolation_step_, and InterpolationModel::scaling_.
| void setInterpolationStep | ( | CoordinateType | interpolation_step | ) | [inline] |
Set the interpolation step for the linear interpolation of the model.
For setting to take affect, call setSamples().
| virtual void setOffset | ( | CoordinateType | offset | ) | [inline, virtual] |
set the offset of the model
The whole model will be shifted to the new offset without being recomputed all over. Setting takes affect immediately.
Reimplemented in IsotopeModel, LmaGaussModel, and LmaIsotopeModel.
Referenced by MaxLikeliFitter1D::fitOffset_().
| virtual void setSamples | ( | ) | [inline, virtual] |
set sample/supporting points of interpolation wrt params.
Reimplemented in EGHModel, BiGaussModel, EmgModel, ExtendedIsotopeModel, GaussModel, LmaGaussModel, and LmaIsotopeModel.
| void setScalingFactor | ( | CoordinateType | scaling | ) | [inline] |
| void updateMembers_ | ( | ) | [inline, protected, virtual] |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from BaseModel< 1 >.
Reimplemented in EGHModel, BiGaussModel, EmgModel, ExtendedIsotopeModel, GaussModel, IsotopeModel, LmaGaussModel, and LmaIsotopeModel.
LinearInterpolation interpolation_ [protected] |
Referenced by InterpolationModel::operator=().
CoordinateType interpolation_step_ [protected] |
Referenced by InterpolationModel::operator=().
CoordinateType scaling_ [protected] |
Referenced by InterpolationModel::operator=().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:57 using doxygen 1.7.1 |