Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
TransformationModelLinear Class Reference

Linear model for transformations. More...

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

Inheritance diagram for TransformationModelLinear:
TransformationModel

Public Member Functions

 TransformationModelLinear (const DataPoints &data, const Param &params)
 Constructor. More...
 
 ~TransformationModelLinear ()
 Destructor. More...
 
virtual DoubleReal evaluate (const DoubleReal value) const
 Evaluates the model at the given value. More...
 
void getParameters (DoubleReal &slope, DoubleReal &intercept) const
 Gets the "real" parameters. More...
 
void invert ()
 Computes the inverse. More...
 
- Public Member Functions inherited from TransformationModel
 TransformationModel ()
 Constructor. More...
 
 TransformationModel (const TransformationModel::DataPoints &, const Param &)
 Alternative constructor (derived classes should implement this one!) More...
 
virtual ~TransformationModel ()
 Destructor. More...
 
void getParameters (Param &params) const
 Gets the (actual) parameters. 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 Attributes

DoubleReal slope_
 Parameters of the linear model. More...
 
DoubleReal intercept_
 
bool data_given_
 Was the model estimated from data? More...
 
bool symmetric_
 Use symmetric regression? More...
 
- Protected Attributes inherited from TransformationModel
Param params_
 Parameters. More...
 

Additional Inherited Members

- Public Types inherited from TransformationModel
typedef std::pair< DoubleReal,
DoubleReal
DataPoint
 Coordinate pair. More...
 
typedef std::vector< DataPointDataPoints
 Vector of coordinate pairs. More...
 

Detailed Description

Linear model for transformations.

The model can be inferred from data or specified using explicit parameters. If data is given, a least squares fit is used to find the model parameters (slope and intercept). Depending on parameter symmetric_regression, a normal regression (y on x) or symmetric regression ( $ y - x $ on $ y + x $) is performed.

Without data, the model can be specified by giving the parameters slope and intercept explicitly.

Constructor & Destructor Documentation

TransformationModelLinear ( const DataPoints data,
const Param params 
)

Constructor.

Exceptions
IllegalArgumentis thrown if neither data points nor explicit parameters (slope/intercept) are given.

Destructor.

Member Function Documentation

virtual DoubleReal evaluate ( const DoubleReal  value) const
virtual

Evaluates the model at the given value.

Reimplemented from TransformationModel.

static void getDefaultParameters ( Param params)
static

Gets the default parameters.

void getParameters ( DoubleReal slope,
DoubleReal intercept 
) const

Gets the "real" parameters.

void invert ( )

Computes the inverse.

Exceptions
DivisionByZerois thrown if the slope is zero.

Member Data Documentation

bool data_given_
protected

Was the model estimated from data?

DoubleReal intercept_
protected
DoubleReal slope_
protected

Parameters of the linear model.

bool symmetric_
protected

Use symmetric regression?


OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:26 using doxygen 1.8.5