OpenMS  2.6.0
Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | List of all members
TransformationModelBSpline Class Reference

B-spline (non-linear) model for transformations. More...

#include <OpenMS/ANALYSIS/MAPMATCHING/TransformationModelBSpline.h>

Inheritance diagram for TransformationModelBSpline:
[legend]
Collaboration diagram for TransformationModelBSpline:
[legend]

Public Member Functions

 TransformationModelBSpline (const DataPoints &data, const Param &params)
 Constructor. More...
 
 ~TransformationModelBSpline () override
 Destructor. More...
 
double evaluate (double value) const override
 Evaluates the model at the given value. More...
 
const ParamgetParameters () const
 Gets the (actual) parameters. More...
 
- Public Member Functions inherited from TransformationModel
 TransformationModel ()
 Constructor. More...
 
 TransformationModel (const TransformationModel::DataPoints &, const Param &)
 
virtual ~TransformationModel ()
 Destructor. More...
 
virtual void weightData (DataPoints &data)
 Weight the data by the given weight function. More...
 
virtual void unWeightData (DataPoints &data)
 Unweight the data by the given weight function. More...
 
bool checkValidWeight (const String &weight, const std::vector< String > &valid_weights) const
 Check for a valid weighting function string. More...
 
double checkDatumRange (const double &datum, const double &datum_min, const double &datum_max)
 Check that the datum is within the valid min and max bounds. More...
 
double weightDatum (const double &datum, const String &weight) const
 Weight the data according to the weighting function. More...
 
double unWeightDatum (const double &datum, const String &weight) const
 Apply the reverse of the weighting function to the data. More...
 
const ParamgetParameters () const
 Gets the (actual) parameters. More...
 
std::vector< StringgetValidXWeights () const
 Returns a list of valid x weight function strings. More...
 
std::vector< StringgetValidYWeights () const
 Returns a list of valid y weight function strings. More...
 

Static Public Member Functions

static void getDefaultParameters (Param &params)
 Gets the default parameters. More...
 
- Static Public Member Functions inherited from TransformationModel
static void getDefaultParameters (Param &params)
 Gets the default parameters. More...
 

Protected Types

enum  { EX_LINEAR, EX_BSPLINE, EX_CONSTANT, EX_GLOBAL_LINEAR }
 Method to use for extrapolation (beyond 'xmin_'/'xmax_') More...
 

Protected Attributes

BSpline2dspline_
 Pointer to the actual B-spline. More...
 
double xmin_
 Min./max. x value (endpoints of the data range) More...
 
double xmax_
 
enum OpenMS::TransformationModelBSpline:: { ... }  extrapolate_
 Method to use for extrapolation (beyond 'xmin_'/'xmax_') More...
 
double offset_min_
 Parameters for constant or linear extrapolation. More...
 
double offset_max_
 
double slope_min_
 
double slope_max_
 
- Protected Attributes inherited from TransformationModel
Param params_
 Parameters. More...
 
String x_weight_
 x weighting More...
 
double x_datum_min_
 
double x_datum_max_
 
String y_weight_
 y weighting More...
 
double y_datum_min_
 
double y_datum_max_
 
bool weighting_
 

Additional Inherited Members

- Public Types inherited from TransformationModel
typedef std::vector< DataPointDataPoints
 Vector of coordinate pairs. More...
 

Detailed Description

B-spline (non-linear) model for transformations.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Method to use for extrapolation (beyond 'xmin_'/'xmax_')

Enumerator
EX_LINEAR 
EX_BSPLINE 
EX_CONSTANT 
EX_GLOBAL_LINEAR 

Constructor & Destructor Documentation

◆ TransformationModelBSpline()

TransformationModelBSpline ( const DataPoints data,
const Param params 
)

Constructor.

Exceptions
Exception::IllegalArgumentis thrown if a parameter is invalid.
Exception::UnableToFitis thrown if the B-spline fit fails.

◆ ~TransformationModelBSpline()

Destructor.

Member Function Documentation

◆ evaluate()

double evaluate ( double  value) const
overridevirtual

Evaluates the model at the given value.

Reimplemented from TransformationModel.

◆ getDefaultParameters()

static void getDefaultParameters ( Param params)
static

Gets the default parameters.

◆ getParameters()

const Param& getParameters

Gets the (actual) parameters.

Member Data Documentation

◆ extrapolate_

enum { ... } extrapolate_

Method to use for extrapolation (beyond 'xmin_'/'xmax_')

◆ offset_max_

double offset_max_
protected

◆ offset_min_

double offset_min_
protected

Parameters for constant or linear extrapolation.

◆ slope_max_

double slope_max_
protected

◆ slope_min_

double slope_min_
protected

◆ spline_

BSpline2d* spline_
protected

Pointer to the actual B-spline.

◆ xmax_

double xmax_
protected

◆ xmin_

double xmin_
protected

Min./max. x value (endpoints of the data range)