OpenMS
|
Normal distribution approximated using linear interpolation. More...
#include <OpenMS/FEATUREFINDER/GaussModel.h>
Public Types | |
typedef InterpolationModel::CoordinateType | CoordinateType |
typedef Math::BasicStatistics< CoordinateType > | BasicStatistics |
typedef InterpolationModel | InterpolationModel |
Public Types inherited from InterpolationModel | |
typedef double | IntensityType |
typedef DPosition< 1 > | PositionType |
typedef double | CoordinateType |
using | KeyType = double |
typedef Math::LinearInterpolation< KeyType > | LinearInterpolation |
Public Types inherited from BaseModel | |
typedef double | IntensityType |
typedef double | CoordinateType |
typedef DPosition< 1 > | PositionType |
typedef DPeak< 1 >::Type | PeakType |
typedef std::vector< PeakType > | SamplesType |
Public Member Functions | |
GaussModel () | |
Default constructor. More... | |
GaussModel (const GaussModel &source) | |
copy constructor More... | |
~GaussModel () override | |
destructor More... | |
virtual GaussModel & | operator= (const GaussModel &source) |
assignment operator More... | |
void | setOffset (CoordinateType offset) override |
set the offset of the model More... | |
void | setSamples () override |
set sample/supporting points of interpolation More... | |
CoordinateType | getCenter () const override |
get the center of the Gaussian model i.e. the position of the maximum More... | |
Public Member Functions inherited from InterpolationModel | |
InterpolationModel () | |
Default constructor. More... | |
InterpolationModel (const InterpolationModel &source) | |
copy constructor More... | |
~InterpolationModel () override=default | |
destructor More... | |
InterpolationModel & | operator= (const InterpolationModel &source) |
assignment operator More... | |
IntensityType | getIntensity (const PositionType &pos) const override |
access model predicted intensity at position pos More... | |
IntensityType | getIntensity (CoordinateType coord) const |
access model predicted intensity at position pos More... | |
const LinearInterpolation & | getInterpolation () const |
Returns the interpolation class. More... | |
CoordinateType | getScalingFactor () const |
get the scaling for the model More... | |
void | getSamples (SamplesType &cont) const override |
get reasonable set of samples from the model (i.e. for printing) More... | |
void | setInterpolationStep (CoordinateType interpolation_step) |
Set the interpolation step for the linear interpolation of the model. More... | |
void | setScalingFactor (CoordinateType scaling) |
Public Member Functions inherited from BaseModel | |
BaseModel () | |
Default constructor. More... | |
BaseModel (const BaseModel &source) | |
copy constructor More... | |
~BaseModel () override | |
Destructor. More... | |
BaseModel & | operator= (const BaseModel &source) |
assignment operator More... | |
virtual bool | isContained (const PositionType &pos) const |
check if position pos is part of the model regarding the models cut-off. More... | |
template<typename PeakType > | |
void | fillIntensity (PeakType &peak) const |
Convenience function to set the intensity of a peak to the predicted intensity at its current position, calling virtual void getIntensity(). More... | |
template<class PeakIterator > | |
void | fillIntensities (PeakIterator begin, PeakIterator end) const |
Convenience function that applies fillIntensity() to an iterator range. More... | |
virtual IntensityType | getCutOff () const |
get cutoff value More... | |
virtual void | setCutOff (IntensityType cut_off) |
set cutoff value More... | |
virtual void | getSamples (std::ostream &os) |
fill stream with reasonable set of samples from the model (i.e. for printing) More... | |
Public Member Functions inherited from DefaultParamHandler | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Protected Member Functions | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
Protected Member Functions inherited from InterpolationModel | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
CoordinateType | min_ |
CoordinateType | max_ |
BasicStatistics | statistics_ |
Protected Attributes inherited from InterpolationModel | |
LinearInterpolation | interpolation_ |
CoordinateType | interpolation_step_ |
CoordinateType | scaling_ |
Protected Attributes inherited from BaseModel | |
IntensityType | cut_off_ |
Protected Attributes inherited from DefaultParamHandler | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
Normal distribution approximated using linear interpolation.
Parameters of this class are:Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
cutoff | float | 0.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.0 | Scaling factor used to adjust the model distribution to the intensities of the data | |
bounding_box:min | float | 0.0 | Lower end of bounding box enclosing the data used to fit the model. | |
bounding_box:max | float | 1.0 | Upper end of bounding box enclosing the data used to fit the model. | |
statistics:mean | float | 0.0 | Centroid position of the model (Gaussian). | |
statistics:variance | float | 1.0 | The variance of the Gaussian. |
typedef InterpolationModel InterpolationModel |
GaussModel | ( | ) |
Default constructor.
GaussModel | ( | const GaussModel & | source | ) |
copy constructor
|
override |
destructor
|
overridevirtual |
get the center of the Gaussian model i.e. the position of the maximum
Reimplemented from InterpolationModel.
|
virtual |
assignment operator
|
overridevirtual |
set the offset of the model
The whole model will be shifted to the new offset without being computing all over. and without any discrepancy.
Reimplemented from InterpolationModel.
|
overridevirtual |
set sample/supporting points of interpolation
Reimplemented from InterpolationModel.
|
overrideprotectedvirtual |
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.
|
protected |
|
protected |
|
protected |