Patate Lib  0.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Grenaille::GLSParam< DataPoint, _WFunctor, T > Class Template Reference

Inherits Grenaille::Concept::FittingExtensionConcept< DataPoint, _WFunctor, T >, and T.

Detailed Description

template<class DataPoint, class _WFunctor, typename T>
class Grenaille::GLSParam< DataPoint, _WFunctor, T >

Growing Least Squares reparemetrization of the OrientedSphereFit.

Method published in [4]

This class assumes that the WeightFunc defines the accessor

w.evalScale();

in order to access to the evaluation scale, needed to compute the scale invariant GLS reparametrization (all *_normalized methods).

Computed values:

Requierement:

PROVIDES_ALGEBRAIC_SPHERE 

Provide:

PROVIDES_GLS_PARAMETRIZATION 

Public Types

typedef Base::Scalar Scalar
 Inherited scalar type.
 
typedef Base::VectorType VectorType
 Inherited vector type.
 
typedef Base::WFunctor WFunctor
 Weight Function.
 

Public Member Functions

 GLSParam ()
 Default constructor.
 
void setWeightFunc (const WFunctor &_w)
 Init the WeightFunc, without changing the other internal states. More...
 
FIT_RESULT finalize ()
 Finalize the fitting procedure. More...
 
Scalar tau () const
 Compute and return \( \tau \).
 
VectorType eta () const
 Compute and return \( \eta \).
 
Scalar kappa () const
 Compute and return \( \kappa \).
 
Scalar tau_normalized () const
 Compute and return \( \frac{\tau}{t} \).
 
VectorType eta_normalized () const
 Compute and return \( \eta \).
 
Scalar kappa_normalized () const
 Compute and return \( t \kappa \).
 
Scalar fitness () const
 Return the fitness, e.g. the pratt norm of the initial scalar field.
 
Scalar compareTo (const GLSParam< DataPoint, _WFunctor, T > &_other, bool _useFitness=true) const
 Compare current instance with other. More...
 
- Public Member Functions inherited from Grenaille::Concept::FittingExtensionConcept< DataPoint, _WFunctor, T >
void setWeightFunc (const WFunctor &w)
 
void init (const VectorType &evalPos)
 
bool addNeighbor (const DataPoint &nei)
 
FIRESULT finalize ()
 

Protected Types

enum  { Check = Base::PROVIDES_ALGEBRAIC_SPHERE, PROVIDES_GLS_PARAMETRIZATION }
 

Protected Attributes

Scalar m_t
 Evaluation scale. Needed to computed the normalized values.
 
Scalar m_fitness
 Save the fitness value to avoid side effect with Pratt normalization.
 

Member Function Documentation

template<class DataPoint, class _WFunctor, typename T>
Scalar Grenaille::GLSParam< DataPoint, _WFunctor, T >::compareTo ( const GLSParam< DataPoint, _WFunctor, T > &  _other,
bool  _useFitness = true 
) const
inline

Compare current instance with other.

Returns
a distance between two fits (0 correspond to two similar fits)
Warning
Use the same scale to have a useful comparison (normalized value are used)
template<class DataPoint, class _WFunctor, typename T>
FIT_RESULT Grenaille::GLSParam< DataPoint, _WFunctor, T >::finalize ( )
inline

Finalize the fitting procedure.

Returns
the corresponding state of the fitting
Warning
Must be called be for any use of the fitting output
template<class DataPoint, class _WFunctor, typename T>
void Grenaille::GLSParam< DataPoint, _WFunctor, T >::setWeightFunc ( const WFunctor _w)
inline

Init the WeightFunc, without changing the other internal states.

Warning
Must be called be for any computation