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

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

Detailed Description

template<class DataPoint, class _WFunctor, typename T, int Type>
class Grenaille::internal::OrientedSphereDer< DataPoint, _WFunctor, T, Type >

Internal generic class performing the Fit derivation.

The differentiation can be done automatically in scale and/or space, by combining the enum values FitScaleDer and FitSpaceDer in the template parameter Type.

The differenciated values are stored in static arrays. The size of the arrays is computed with respect to the derivation type (scale and/or space) and the number of the dimension of the ambiant space. By convention, the scale derivatives are stored at index 0 when Type contains at least FitScaleDer. The size of these arrays can be known using derDimension(), and the differentiation type by isScaleDer() and isSpaceDer().

Public Types

typedef Base::Scalar Scalar
 Inherited scalar type.
 
typedef Base::VectorType VectorType
 Inherited vector type.
 
typedef Base::WFunctor WFunctor
 Weight Function.
 
typedef Eigen::Matrix< Scalar,
DataPoint::Dim,
GLS_DER_NB_DERIVATIVES(Type,
DataPoint::Dim),
GLS_DER_STORAGE_ORDER(Type) > 
VectorArray
 Static array of scalars with a size adapted to the differentiation type.
 
typedef Eigen::Matrix< Scalar,
1, GLS_DER_NB_DERIVATIVES(Type,
DataPoint::Dim) > 
ScalarArray
 Static array of scalars with a size adapted to the differentiation type.
 

Public Member Functions

void init (const VectorType &evalPos)
 
bool addNeighbor (const DataPoint &nei)
 
FIT_RESULT finalize ()
 
ScalarArray dPotential () const
 Returns the derivatives of the scalar field at the evaluation point.
 
VectorArray dNormal () const
 Returns the derivatives of the primitive normal.
 
ScalarArray dprattNorm2 () const
 compute the square of the Pratt norm derivative
 
Scalar dprattNorm2 (unsigned int _d) const
 compute the square of the Pratt norm derivative for dimension _d
 
Scalar dprattNorm (unsigned int _d) const
 compute the Pratt norm derivative for the dimension _d
 
Scalar dprattNorm () const
 compute the Pratt norm derivative
 
bool isScaleDer () const
 State specified at compilation time to differenciate the fit in scale.
 
bool isSpaceDer () const
 State specified at compilation time to differenciate the fit in space.
 
unsigned int derDimension () const
 Number of dimensions used for the differentiation.
 
bool applyPrattNorm ()
 Normalize the scalar field by the Pratt norm. 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 ()
 

Public Attributes

ScalarArray m_dUc
 Derivative of the hyper-sphere constant term.
 
ScalarArray m_dUq
 Derivative of the hyper-sphere quadratic term.
 
VectorArray m_dUl
 Derivative of the hyper-sphere linear term.
 

Protected Types

enum  { Check = Base::PROVIDES_ALGEBRAIC_SPHERE, PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE, PROVIDES_NORMAL_DERIVATIVE }
 

Member Enumeration Documentation

template<class DataPoint, class _WFunctor, typename T, int Type>
anonymous enum
protected
Enumerator
Check 

Needs Algebraic Sphere.

PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE 

Provides Algebraic Sphere derivative.

Member Function Documentation

template<class DataPoint, class _WFunctor , typename T , int Type>
bool internal::OrientedSphereDer::addNeighbor ( const DataPoint &  nei)
template<class DataPoint , class _WFunctor , typename T , int Type>
bool internal::OrientedSphereDer::applyPrattNorm ( )
inline

Normalize the scalar field by the Pratt norm.

Warning
Requieres that isNormalized() return false
Returns
false when the original sphere has already been normalized.
template<class DataPoint , class _WFunctor , typename T , int Type>
FIT_RESULT internal::OrientedSphereDer::finalize ( )
template<class DataPoint , class _WFunctor , typename T , int Type>
void internal::OrientedSphereDer::init ( const VectorType evalPos)