Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Static Public Member Functions | Protected Attributes

TransformationModelLinear Class Reference
[MapAlignment]

Linear model for transformations. More...

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

Inheritance diagram for TransformationModelLinear:
TransformationModel

List of all members.

Public Member Functions

 TransformationModelLinear (const DataPoints &data, const Param &params)
 Constructor.
 ~TransformationModelLinear ()
 Destructor.
virtual DoubleReal evaluate (const DoubleReal value) const
 Evaluates the model at the given value.
void getParameters (DoubleReal &slope, DoubleReal &intercept) const
 Gets the "real" parameters.
void invert ()
 Computes the inverse.

Static Public Member Functions

static void getDefaultParameters (Param &params)
 Gets the default parameters.

Protected Attributes

DoubleReal slope_
 Parameters of the linear model.
DoubleReal intercept_
bool data_given_
 Was the model estimated from data?
bool symmetric_
 Use symmetric regression?

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:
IllegalArgument is 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.

Reimplemented from TransformationModel.

void getParameters ( DoubleReal slope,
DoubleReal intercept 
) const

Gets the "real" parameters.

void invert (  ) 

Computes the inverse.

Exceptions:
DivisionByZero is 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.10.0 Documentation generated on Thu Mar 7 2013 09:42:49 using doxygen 1.7.1