Ponca  8e4373a7fc557bbfb1afb9210d70f03872388d04
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T > Class Template Reference

Generic class performing the Fit derivation. More...

#include <primitive.h>

+ Inheritance diagram for Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >:
+ Collaboration diagram for Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >:

Public Types

using Scalar = typename DataPoint::Scalar
 Alias to scalar type.
 
using VectorType = typename Base::VectorType
 Alias to vector type.
 
using NeighborFilter = typename Base::NeighborFilter
 Alias to the filter applied on the neighbors.
 
using MatrixType = typename DataPoint::MatrixType
 Alias to matrix type.
 
typedef Eigen::Matrix< Scalar, DataPoint::Dim, NbDerivatives, DerStorageOrder > VectorArray
 Static array of scalars with a size adapted to the differentiation type.
 
typedef Eigen::Matrix< Scalar, 1, NbDerivatives > ScalarArray
 Static array of scalars with a size adapted to the differentiation type.
 

Public Member Functions

void init ()
 
bool addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw)
 
constexpr bool isScaleDer () const
 State specified at compilation time to compute derivatives in scale.
 
constexpr bool isSpaceDer () const
 State specified at compilation time to compute derivatives in space.
 
constexpr unsigned int derDimension () const
 Number of dimensions used for the differentiation.
 

Protected Types

enum  { Check = Base::PROVIDES_PRIMITIVE_BASE , PROVIDES_PRIMITIVE_DERIVATIVE }
 
using Base = T
 Base class of the procedure.
 

Protected Attributes

ScalarArray m_dSumW
 Sum of weight derivatives.
 

Static Protected Attributes

static constexpr int NbDerivatives = ((Type & FitScaleDer) ? 1 : 0 ) + ((Type & FitSpaceDer) ? DataPoint::Dim : 0)
 
static constexpr int DerStorageOrder = (Type & FitSpaceDer) ? Eigen::RowMajor : Eigen::ColMajor
 

Detailed Description

template<class DataPoint, class _NFilter, int Type, typename T>
class Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >

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 differentiated 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().

Thanks to the BasketDiff definition, we know that PrimitiveDer has Primitive as base class (through the Basket). As a result, this class first asks to compute the Fit, and if it works properly, compute the weight derivatives.

Definition at line 162 of file primitive.h.

Member Typedef Documentation

◆ Base

template<class DataPoint , class _NFilter , int Type, typename T >
using Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::Base = T
protected

Base class of the procedure.

Definition at line 164 of file primitive.h.

◆ MatrixType

template<class DataPoint , class _NFilter , int Type, typename T >
using Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::MatrixType = typename DataPoint::MatrixType

Alias to matrix type.

Definition at line 165 of file primitive.h.

◆ NeighborFilter

template<class DataPoint , class _NFilter , int Type, typename T >
using Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::NeighborFilter = typename Base::NeighborFilter

Alias to the filter applied on the neighbors.

Definition at line 164 of file primitive.h.

◆ Scalar

template<class DataPoint , class _NFilter , int Type, typename T >
using Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::Scalar = typename DataPoint::Scalar

Alias to scalar type.

Definition at line 164 of file primitive.h.

◆ ScalarArray

template<class DataPoint , class _NFilter , int Type, typename T >
typedef Eigen::Matrix<Scalar, 1, NbDerivatives> Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::ScalarArray

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

Definition at line 182 of file primitive.h.

◆ VectorArray

template<class DataPoint , class _NFilter , int Type, typename T >
typedef Eigen::Matrix<Scalar, DataPoint::Dim, NbDerivatives, DerStorageOrder> Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::VectorArray

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

Definition at line 179 of file primitive.h.

◆ VectorType

template<class DataPoint , class _NFilter , int Type, typename T >
using Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::VectorType = typename Base::VectorType

Alias to vector type.

Definition at line 164 of file primitive.h.

Member Enumeration Documentation

◆ anonymous enum

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

Provides base API for primitives.

Definition at line 167 of file primitive.h.

Member Function Documentation

◆ addLocalNeighbor()

template<class DataPoint , class _NFilter , int Type, typename T >
bool Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::addLocalNeighbor ( Scalar  w,
const VectorType localQ,
const DataPoint &  attributes,
ScalarArray dw 
)
inline
See also
Concept::FittingProcedureConcept::addLocalNeighbor()

Definition at line 202 of file primitive.h.

◆ derDimension()

template<class DataPoint , class _NFilter , int Type, typename T >
constexpr unsigned int Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::derDimension ( ) const
inlineconstexpr

Number of dimensions used for the differentiation.

Definition at line 230 of file primitive.h.

◆ init()

template<class DataPoint , class _NFilter , int Type, typename T >
void Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::init ( )
inline
See also
Concept::FittingProcedureConcept::init()

Definition at line 194 of file primitive.h.

◆ isScaleDer()

template<class DataPoint , class _NFilter , int Type, typename T >
constexpr bool Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::isScaleDer ( ) const
inlineconstexpr

State specified at compilation time to compute derivatives in scale.

Definition at line 226 of file primitive.h.

◆ isSpaceDer()

template<class DataPoint , class _NFilter , int Type, typename T >
constexpr bool Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::isSpaceDer ( ) const
inlineconstexpr

State specified at compilation time to compute derivatives in space.

Definition at line 228 of file primitive.h.

Member Data Documentation

◆ DerStorageOrder

template<class DataPoint , class _NFilter , int Type, typename T >
constexpr int Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::DerStorageOrder = (Type & FitSpaceDer) ? Eigen::RowMajor : Eigen::ColMajor
staticconstexprprotected

Definition at line 174 of file primitive.h.

◆ m_dSumW

template<class DataPoint , class _NFilter , int Type, typename T >
ScalarArray Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::m_dSumW
protected

Sum of weight derivatives.

Definition at line 186 of file primitive.h.

◆ NbDerivatives

template<class DataPoint , class _NFilter , int Type, typename T >
constexpr int Ponca::PrimitiveDer< DataPoint, _NFilter, Type, T >::NbDerivatives = ((Type & FitScaleDer) ? 1 : 0 ) + ((Type & FitSpaceDer) ? DataPoint::Dim : 0)
staticconstexprprotected

Definition at line 173 of file primitive.h.