Ponca  4d2a58fa5c6375adef5c4b208f4d47e016cecd6d
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T > Class Template Reference

Base class of any computation unit of a BasketDiff. More...

#include <basketUnit.h>

+ Inheritance diagram for Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >:
+ Collaboration diagram for Ponca::BasketDiffUnitBase< 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.
 
using VectorArray = Eigen::Matrix< Scalar, DataPoint::Dim, NbDerivatives, DerStorageOrder >
 Static array of scalars with a size adapted to the differentiation type.
 
using ScalarArray = Eigen::Matrix< Scalar, 1, NbDerivatives >
 Static array of scalars with a size adapted to the differentiation type.
 

Public Member Functions

void init ()
 
void addLocalNeighbor (Scalar w, const VectorType &localQ, const DataPoint &attributes, ScalarArray &dw)
 

Static Public Member Functions

static constexpr bool isScaleDer ()
 State specified at compilation time to compute derivatives in scale.
 
static constexpr bool isSpaceDer ()
 State specified at compilation time to compute derivatives in space.
 
static constexpr unsigned int derDimension ()
 Number of dimensions used for the differentiation.
 

Protected Types

using Base = T
 Base class of the procedure.
 

Protected Attributes

ScalarArray m_dSumW
 Sum of weight derivatives.
 

Static Protected Attributes

static constexpr int NbDerivatives
 
static constexpr int DerStorageOrder = (Type & FitSpaceDer) ? Eigen::RowMajor : Eigen::ColMajor
 

Detailed Description

template<class DataPoint, class _NFilter, int Type, typename T>
requires ProvidesBasketUnitBase<T>
class Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >

Base class of any computation unit of a BasketDiff.

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 BasketDiffUnitBase has BasketUnitBase 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 142 of file basketUnit.h.

Member Typedef Documentation

◆ Base

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

Base class of the procedure.

Definition at line 144 of file basketUnit.h.

◆ MatrixType

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

Alias to matrix type.

Definition at line 145 of file basketUnit.h.

◆ NeighborFilter

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

Alias to the filter applied on the neighbors.

Definition at line 144 of file basketUnit.h.

◆ Scalar

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

Alias to scalar type.

Definition at line 144 of file basketUnit.h.

◆ ScalarArray

template<class DataPoint , class _NFilter , int Type, typename T >
using Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >::ScalarArray = Eigen::Matrix<Scalar, 1, NbDerivatives>

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

Definition at line 156 of file basketUnit.h.

◆ VectorArray

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

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

Definition at line 153 of file basketUnit.h.

◆ VectorType

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

Alias to vector type.

Definition at line 144 of file basketUnit.h.

Member Function Documentation

◆ addLocalNeighbor()

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

Definition at line 178 of file basketUnit.h.

◆ derDimension()

template<class DataPoint , class _NFilter , int Type, typename T >
static constexpr unsigned int Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >::derDimension ( )
inlinestaticconstexpr

Number of dimensions used for the differentiation.

Definition at line 203 of file basketUnit.h.

◆ init()

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

Definition at line 167 of file basketUnit.h.

◆ isScaleDer()

template<class DataPoint , class _NFilter , int Type, typename T >
static constexpr bool Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >::isScaleDer ( )
inlinestaticconstexpr

State specified at compilation time to compute derivatives in scale.

Definition at line 199 of file basketUnit.h.

◆ isSpaceDer()

template<class DataPoint , class _NFilter , int Type, typename T >
static constexpr bool Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >::isSpaceDer ( )
inlinestaticconstexpr

State specified at compilation time to compute derivatives in space.

Definition at line 201 of file basketUnit.h.

Member Data Documentation

◆ DerStorageOrder

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

Definition at line 149 of file basketUnit.h.

◆ m_dSumW

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

Sum of weight derivatives.

Definition at line 160 of file basketUnit.h.

◆ NbDerivatives

template<class DataPoint , class _NFilter , int Type, typename T >
constexpr int Ponca::BasketDiffUnitBase< DataPoint, _NFilter, Type, T >::NbDerivatives
staticconstexprprotected
Initial value:
=
((Type & FitScaleDer) ? 1 : 0) + ((Type & FitSpaceDer) ? DataPoint::Dim : 0)
@ FitSpaceDer
Flag indicating a space differentiation.
Definition enums.h:36
@ FitScaleDer
Flag indicating a scale differentiation.
Definition enums.h:35

Definition at line 147 of file basketUnit.h.