Public Types | Public Member Functions | Public Attributes

TRTK::Fit< T > Class Template Reference

Base class for all fitting classes. More...

#include <Fit.hpp>

Inheritance diagram for TRTK::Fit< T >:

List of all members.

Public Types

enum  Error {
  DATA_POINTS_TOO_SIMILAR, INFINITY_NOT_AVAILABLE, NAN_NOT_AVAILABLE, NOT_ENOUGH_POINTS,
  UNKNOWN_ERROR, WRONG_POINT_SIZE
}
typedef Eigen::Array< T,
Eigen::Dynamic, 1 > 
ArrayXT
 General-purpose array of arbitrary size with value type T.
typedef Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
MatrixXT
 Matrix of arbitrary size with value type T.
typedef Eigen::Matrix< T,
Eigen::Dynamic, 1 > 
VectorXT
 Column vector of arbitrary size with value type T.
typedef Eigen::Matrix< T, 2, 1 > Vector2T
 2D column vector with value type T.
typedef Eigen::Matrix< T, 3, 1 > Vector3T
 3D column vector with value type T.
typedef Eigen::Matrix< T, 4, 1 > Vector4T
 4D column vector with value type T.
typedef Eigen::Matrix< T, 2, 2 > Matrix2T
 2 x 2 matrix with value type T.
typedef Eigen::Matrix< T, 3, 3 > Matrix3T
 3 x 3 matrix with value type T.

Public Member Functions

virtual ~Fit ()
 Destructor.
virtual void compute ()=0
 Performs the regression analysis.
virtual T getDistanceTo (const Coordinate< T > &point) const =0
 Returns the distance/deviation of the given data point to the estimated model.
virtual T getRMS () const =0
 Returns the root mean square error of the model fitting.
virtual unsigned getNumberPointsRequired () const =0
 Returns the minimum number of data points required to compute a model.
virtual void setPoints (const std::vector< Coordinate< T > > &)=0
 Sets the data point set.

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW
typedef T 
value_type
 Internally used value type (should be a floating point type).

Detailed Description

template<class T>
class TRTK::Fit< T >

Base class for all fitting classes.

Template Parameters:
Tfloating point type

Every fitting algorithm must provide the method setPoints() with which the data points can be passed. In general, a model is only computed by calling the member function compute(). Bear that in mind before calling the getter functions. After having estimated the regression model, the estimation error can be determined by getRMS(). The minimum number of points needed to be able to compute a model is given by getMinimumNumberOfPoints().

See also:
Fit2D, Fit3D
Author:
Christoph Haenisch, Fabian Killus
Version:
0.2.0
Date:
2012-03-29

Definition at line 53 of file Fit.hpp.


Member Enumeration Documentation

template<class T>
enum TRTK::Fit::Error
Enumerator:
DATA_POINTS_TOO_SIMILAR 

The data points are to similar.

INFINITY_NOT_AVAILABLE 

The type T cannot represent infinity (see std::numeric_limits<T>).

NAN_NOT_AVAILABLE 

The type T cannot represent NaN (see std::numeric_limits<T>).

NOT_ENOUGH_POINTS 

More points are required to estimate the transformation.

UNKNOWN_ERROR 

An unknown error occured.

WRONG_POINT_SIZE 

One or more points have a wrong size.

Definition at line 69 of file Fit.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines