Ponca  e26a0e88a45818354616c1a7180bcd203aecad3c
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T > Class Template Reference

[OrientedSphereFit Definition] More...

#include <orientedSphereFit.h>

+ Inheritance diagram for Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >:
+ Collaboration diagram for Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >:

Public Types

using Scalar = typename DataPoint::Scalar
 Alias to scalar type.
 
using VectorType = typename Base::VectorType
 Alias to vector type.
 
using WFunctor = typename Base::WFunctor
 Alias to weight function.
 
using ScalarArray = typename Base::ScalarArray
 Alias to scalar derivatives array.
 
using VectorArray = typename Base::VectorArray
 Alias to vector derivatives array.
 

Public Member Functions

OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T > & orientedSphereDer ()
 Explicit conversion to OrientedSphereDerImpl , to access methods potentially hidden by heritage.
 
const OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T > & orientedSphereDer () const
 Explicit conversion to OrientedSphereDerImpl , to access methods potentially hidden by heritage.
 
void init (const VectorType &_evalPos)
 Set the evaluation position and reset the internal states.
 
bool addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw)
 Add a neighbor to perform the fit.
 
FIT_RESULT finalize ()
 Finalize the procedure.
 
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 applyPrattNorm ()
 Normalize the scalar field by the Pratt norm.
 

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 , PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE , PROVIDES_NORMAL_DERIVATIVE }
 
using Base = T
 Base class of the procedure.
 

Protected Attributes

VectorArray m_dSumN
 Sum of the normal vectors with differenciated weights.
 
ScalarArray m_dSumDotPN
 Sum of the dot product betwen relative positions and normals with differenciated weights.
 
ScalarArray m_dSumDotPP
 Sum of the squared relative positions with differenciated weights.
 
ScalarArray m_dNume
 Differenciation of the numerator of the quadratic parameter

 
ScalarArray m_dDeno
 Differenciation of the denominator of the quadratic parameter.
 

Detailed Description

template<class DataPoint, class _WFunctor, int DiffType, typename T>
class Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >

[OrientedSphereFit Definition]

Internal generic class performing the Fit derivation

Definition at line 63 of file orientedSphereFit.h.

Member Typedef Documentation

◆ Base

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::Base = T
protected

Base class of the procedure.

Definition at line 65 of file orientedSphereFit.h.

◆ Scalar

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::Scalar = typename DataPoint::Scalar

Alias to scalar type.

Definition at line 65 of file orientedSphereFit.h.

◆ ScalarArray

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::ScalarArray = typename Base::ScalarArray

Alias to scalar derivatives array.

Definition at line 66 of file orientedSphereFit.h.

◆ VectorArray

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::VectorArray = typename Base::VectorArray

Alias to vector derivatives array.

Definition at line 66 of file orientedSphereFit.h.

◆ VectorType

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::VectorType = typename Base::VectorType

Alias to vector type.

Definition at line 65 of file orientedSphereFit.h.

◆ WFunctor

template<class DataPoint , class _WFunctor , int DiffType, typename T >
using Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::WFunctor = typename Base::WFunctor

Alias to weight function.

Definition at line 65 of file orientedSphereFit.h.

Member Enumeration Documentation

◆ anonymous enum

template<class DataPoint , class _WFunctor , int DiffType, typename T >
anonymous enum
protected

Definition at line 69 of file orientedSphereFit.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
bool OrientedSphereDerImpl::addLocalNeighbor ( Scalar  w,
const VectorType localQ,
const DataPoint &  attributes,
ScalarArray dw 
)
inline

Add a neighbor to perform the fit.

Returns
false if param nei is not a valid neighbour (weight = 0)

Definition at line 105 of file orientedSphereFit.hpp.

◆ applyPrattNorm()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
bool OrientedSphereDerImpl::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.

Definition at line 189 of file orientedSphereFit.hpp.

◆ dNormal()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::VectorArray OrientedSphereDerImpl::dNormal ( ) const
inline

Returns the derivatives of the primitive normal.

Definition at line 164 of file orientedSphereFit.hpp.

◆ dPotential()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::ScalarArray OrientedSphereDerImpl::dPotential ( ) const
inline

Returns the derivatives of the scalar field at the evaluation point.

Definition at line 179 of file orientedSphereFit.hpp.

◆ dprattNorm() [1/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Scalar Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::dprattNorm ( ) const
inline

compute the Pratt norm derivative

Definition at line 125 of file orientedSphereFit.h.

◆ dprattNorm() [2/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Scalar Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::dprattNorm ( unsigned int  _d) const
inline

compute the Pratt norm derivative for the dimension _d

Definition at line 118 of file orientedSphereFit.h.

◆ dprattNorm2() [1/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::dprattNorm2 ( ) const
inline

compute the square of the Pratt norm derivative

Definition at line 102 of file orientedSphereFit.h.

◆ dprattNorm2() [2/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Scalar Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::dprattNorm2 ( unsigned int  _d) const
inline

compute the square of the Pratt norm derivative for dimension _d

Definition at line 110 of file orientedSphereFit.h.

◆ finalize()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
FIT_RESULT OrientedSphereDerImpl::finalize ( )
inline

Finalize the procedure.

Returns
Fitting Status
Warning
Must be called be for any use of the fitting output

Definition at line 123 of file orientedSphereFit.hpp.

◆ init()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
void OrientedSphereDerImpl::init ( const VectorType _evalPos)
inline

Set the evaluation position and reset the internal states.

Warning
Must be called be for any computation (but after #setWeightFunc)

Definition at line 86 of file orientedSphereFit.hpp.

◆ orientedSphereDer() [1/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T > & Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::orientedSphereDer ( )
inline

Explicit conversion to OrientedSphereDerImpl , to access methods potentially hidden by heritage.

Definition at line 92 of file orientedSphereFit.h.

◆ orientedSphereDer() [2/2]

template<class DataPoint , class _WFunctor , int DiffType, typename T >
const OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T > & Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::orientedSphereDer ( ) const
inline

Explicit conversion to OrientedSphereDerImpl , to access methods potentially hidden by heritage.

Definition at line 92 of file orientedSphereFit.h.

Member Data Documentation

◆ m_dDeno

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dDeno
protected

Differenciation of the denominator of the quadratic parameter.

Definition at line 83 of file orientedSphereFit.h.

◆ m_dNume

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dNume
protected

Differenciation of the numerator of the quadratic parameter

Definition at line 82 of file orientedSphereFit.h.

◆ m_dSumDotPN

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dSumDotPN
protected

Sum of the dot product betwen relative positions and normals with differenciated weights.

Definition at line 80 of file orientedSphereFit.h.

◆ m_dSumDotPP

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dSumDotPP
protected

Sum of the squared relative positions with differenciated weights.

Definition at line 81 of file orientedSphereFit.h.

◆ m_dSumN

template<class DataPoint , class _WFunctor , int DiffType, typename T >
VectorArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dSumN
protected

Sum of the normal vectors with differenciated weights.

Definition at line 79 of file orientedSphereFit.h.

◆ m_dUc

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dUc

Derivative of the hyper-sphere constant term

Definition at line 87 of file orientedSphereFit.h.

◆ m_dUl

template<class DataPoint , class _WFunctor , int DiffType, typename T >
VectorArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dUl

Derivative of the hyper-sphere linear term

Definition at line 89 of file orientedSphereFit.h.

◆ m_dUq

template<class DataPoint , class _WFunctor , int DiffType, typename T >
ScalarArray Ponca::OrientedSphereDerImpl< DataPoint, _WFunctor, DiffType, T >::m_dUq

Derivative of the hyper-sphere quadratic term.

Definition at line 88 of file orientedSphereFit.h.