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

Extension performing derivation of the mls surface. More...

#include <mlsSphereFitDer.h>

+ Inheritance diagram for Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >:
+ Collaboration diagram for Ponca::MlsSphereFitDer< 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.
 
typedef Eigen::Matrix< Scalar, DerDim, DerDimMatrix
 Static squared matrix of scalars with a size adapted to the differentiation type.
 
typedef Eigen::Matrix< Scalar, DerDim, Dim *DerDimMatrixArray
 Static matrix of scalars with a size adapted to the differentiation type and the dimension of the ambient space.
 

Public Member Functions

MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T > & mlsSphereFitDer ()
 Explicit conversion to MlsSphereFitDer , to access methods potentially hidden by heritage.
 
const MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T > & mlsSphereFitDer () const
 Explicit conversion to MlsSphereFitDer , 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.
 
VectorType primitiveGradient () const
 Value of the normal of the primitive at the evaluation point.
 
VectorArray dNormal () const
 Returns the second derivatives of the scalar field at the evaluation point.
 

Public Attributes

Matrix m_d2Uc
 Second derivative of the hyper-sphere constant term

 
Matrix m_d2Uq
 Second derivative of the hyper-sphere quadratic term.
 
MatrixArray m_d2Ul
 Second derivative of the hyper-sphere linear term

 

Protected Types

enum  { Check = Base::PROVIDES_PRIMITIVE_DERIVATIVE & Base::PROVIDES_ALGEBRAIC_SPHERE_DERIVATIVE , PROVIDES_NORMAL_DERIVATIVE }
 
enum  { Dim = DataPoint::Dim , DerDim = Base::NbDerivatives }
 
using Base = T
 Base class of the procedure.
 

Protected Attributes

Matrix m_d2SumDotPN
 Sum of the dot product between relative positions and normals with twice differenciated weights.
 
Matrix m_d2SumDotPP
 Sum of the squared relative positions with twice differenciated weights.
 
Matrix m_d2SumW
 Sum of queries weight with twice differenciated weights.
 
MatrixArray m_d2SumP
 Sum of relative positions with twice differenciated weights.
 
MatrixArray m_d2SumN
 Sum of normal vectors with twice differenciated weights.
 

Detailed Description

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

Extension performing derivation of the mls surface.

The differentiation is determined by a previous basket elements that must provides first order derivatives of the algebraic sphere parameters.

Definition at line 24 of file mlsSphereFitDer.h.

Member Typedef Documentation

◆ Base

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

Base class of the procedure.

Definition at line 26 of file mlsSphereFitDer.h.

◆ Matrix

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef Eigen::Matrix< Scalar, DerDim, DerDim > Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::Matrix

Static squared matrix of scalars with a size adapted to the differentiation type.

The size is adapted to the differentiation type (scale and/or space) only. Such Matrix is typically used to represent Hessian matrix of multivariate single-valued functions such as \( u_c \) and \( u_q \) of an AlgebraicSphere obtained from a fitting procedure.

Definition at line 54 of file mlsSphereFitDer.h.

◆ MatrixArray

template<class DataPoint , class _WFunctor , int DiffType, typename T >
typedef Eigen::Matrix< Scalar, DerDim, Dim*DerDim > Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::MatrixArray

Static matrix of scalars with a size adapted to the differentiation type and the dimension of the ambient space.

The size is adapted to the differentiation type (scale and/or space) and the dimension of the ambient space. Such Matrix is typically used to represent Hessian matrices of multivariate multi-valued functions such as \( u_l \) of an AlgebraicSphere obtained from a fitting procedure.

A MatrixArray is an array of Matrix (that mimics a 3D matrix) where the number of Matrix is equal to the dimension of the ambient space. The i-th Matrix can be accessed by the following block operation:

int i;
//...
Matrix m_i = a.template block<DerDim, DerDim>(0, i*DerDim);
Eigen::Matrix< Scalar, DerDim, DerDim > Matrix
Static squared matrix of scalars with a size adapted to the differentiation type.
Eigen::Matrix< Scalar, DerDim, Dim *DerDim > MatrixArray
Static matrix of scalars with a size adapted to the differentiation type and the dimension of the amb...
@ DerDim
Number of dimensions used for the differentiation.

Definition at line 75 of file mlsSphereFitDer.h.

◆ Scalar

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

Alias to scalar type.

Definition at line 26 of file mlsSphereFitDer.h.

◆ ScalarArray

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

Alias to scalar derivatives array.

Definition at line 27 of file mlsSphereFitDer.h.

◆ VectorArray

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

Alias to vector derivatives array.

Definition at line 27 of file mlsSphereFitDer.h.

◆ VectorType

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

Alias to vector type.

Definition at line 26 of file mlsSphereFitDer.h.

◆ WFunctor

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

Alias to weight function.

Definition at line 26 of file mlsSphereFitDer.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 30 of file mlsSphereFitDer.h.

◆ anonymous enum

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

Dimension of the ambient space.

DerDim 

Number of dimensions used for the differentiation.

Definition at line 36 of file mlsSphereFitDer.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
bool MlsSphereFitDer::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 28 of file mlsSphereFitDer.hpp.

◆ dNormal()

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

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

Definition at line 185 of file mlsSphereFitDer.hpp.

◆ dPotential()

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

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

See also
method #isSigned of the fit to check if the sign is reliable

Definition at line 160 of file mlsSphereFitDer.hpp.

◆ finalize()

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

Finalize the procedure.

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

Definition at line 66 of file mlsSphereFitDer.hpp.

◆ init()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
void MlsSphereFitDer::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 10 of file mlsSphereFitDer.hpp.

◆ mlsSphereFitDer() [1/2]

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

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

Definition at line 93 of file mlsSphereFitDer.h.

◆ mlsSphereFitDer() [2/2]

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

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

Definition at line 93 of file mlsSphereFitDer.h.

◆ primitiveGradient()

template<class DataPoint , class _WFunctor , int DiffType, typename T >
MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::VectorType MlsSphereFitDer::primitiveGradient ( ) const
inline

Value of the normal of the primitive at the evaluation point.

Definition at line 176 of file mlsSphereFitDer.hpp.

Member Data Documentation

◆ m_d2SumDotPN

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Matrix Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2SumDotPN
protected

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

Definition at line 79 of file mlsSphereFitDer.h.

◆ m_d2SumDotPP

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Matrix Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2SumDotPP
protected

Sum of the squared relative positions with twice differenciated weights.

Definition at line 80 of file mlsSphereFitDer.h.

◆ m_d2SumN

template<class DataPoint , class _WFunctor , int DiffType, typename T >
MatrixArray Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2SumN
protected

Sum of normal vectors with twice differenciated weights.

Definition at line 84 of file mlsSphereFitDer.h.

◆ m_d2SumP

template<class DataPoint , class _WFunctor , int DiffType, typename T >
MatrixArray Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2SumP
protected

Sum of relative positions with twice differenciated weights.

Definition at line 83 of file mlsSphereFitDer.h.

◆ m_d2SumW

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Matrix Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2SumW
protected

Sum of queries weight with twice differenciated weights.

Definition at line 81 of file mlsSphereFitDer.h.

◆ m_d2Uc

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Matrix Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2Uc

Second derivative of the hyper-sphere constant term

Definition at line 88 of file mlsSphereFitDer.h.

◆ m_d2Ul

template<class DataPoint , class _WFunctor , int DiffType, typename T >
MatrixArray Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2Ul

Second derivative of the hyper-sphere linear term

Definition at line 90 of file mlsSphereFitDer.h.

◆ m_d2Uq

template<class DataPoint , class _WFunctor , int DiffType, typename T >
Matrix Ponca::MlsSphereFitDer< DataPoint, _WFunctor, DiffType, T >::m_d2Uq

Second derivative of the hyper-sphere quadratic term.

Definition at line 89 of file mlsSphereFitDer.h.