Ponca  7b3f8ad3fde25a027e6452783ccee143798a71b8
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::BasketDiff< BasketType, Type, Ext0, Exts > Class Template Reference

Aggregator class used to declare specialized structures with derivatives computations, using CRTP. More...

#include <basket.h>

+ Inheritance diagram for Ponca::BasketDiff< BasketType, Type, Ext0, Exts >:
+ Collaboration diagram for Ponca::BasketDiff< BasketType, Type, Ext0, Exts >:

Public Types

using Base = typename internal::BasketDiffAggregate< BasketType, Type, Ext0, Exts... >::type
 
using NeighborFilter = typename BasketType::NeighborFilter
 Neighbor Filter.
 
using DataPoint = typename BasketType::DataPoint
 Point type used for computation.
 
using Scalar = typename BasketType::Scalar
 Scalar type used for computation, as defined from Basket.
 
using VectorType = typename BasketType::VectorType
 Vector type used for computation, as defined from Basket.
 
- Public Types inherited from Ponca::BasketComputeObject< BasketDiff< BasketType, Type, Ext0, Exts... >, internal::BasketDiffAggregate< BasketType, Type, Ext0, Exts... >::type >
using Base = internal::BasketDiffAggregate< BasketType, Type, Ext0, Exts... >::type
 
using Derived = BasketDiff< BasketType, Type, Ext0, Exts... >
 <
 
using Scalar = typename Base::Scalar
 Alias to the Derived type.
 

Public Member Functions

void init ()
 Initialize the fit.
 
void startNewPass ()
 Start a new iteration over neighbor.
 
void finalize ()
 Finalize the fitting procedure.
 
bool addNeighbor (const DataPoint &_nei)
 Add a neighbor to perform the fit.
 
void addLocalNeighbor (Scalar _w, const VectorType &_localQ, const DataPoint &_nei, typename Base::ScalarArray &_dw)
 Add a local neighbor to perform the fit.
 
- Public Member Functions inherited from Ponca::BasketComputeObject< BasketDiff< BasketType, Type, Ext0, Exts... >, internal::BasketDiffAggregate< BasketType, Type, Ext0, Exts... >::type >
FIT_RESULT compute (const IteratorBegin &begin, const IteratorEnd &end)
 Convenience function for STL-like iterators Add neighbors stored in a container using STL-like iterators, and call finalize at the end.
 
FIT_RESULT computeWithIds (IndexRange ids, const PointContainer &points)
 Convenience function to iterate over a subset of samples in a PointContainer Add neighbors stored in a PointContainer and sampled using indices stored in ids.
 
- Public Member Functions inherited from Ponca::ComputeObject< Derived >
template<typename Container >
FIT_RESULT compute (const Container &c)
 Convenience function for STL-like container.
 
template<typename IteratorBegin , typename IteratorEnd >
FIT_RESULT compute (const IteratorBegin &, const IteratorEnd &)
 Convenience function for STL-like iterators.
 
template<typename IndexRange , typename PointContainer >
FIT_RESULT computeWithIds (IndexRange, const PointContainer &)
 Convenience function to iterate over a subset of samples in a PointContainer.
 

Additional Inherited Members

- Protected Member Functions inherited from Ponca::ComputeObject< Derived >
Derived & derived ()
 Retrieve the top layer object Returns a reference to the derived class so that we can use its overwritten methods.
 

Detailed Description

template<typename BasketType, int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
class Ponca::BasketDiff< BasketType, Type, Ext0, Exts >

Aggregator class used to declare specialized structures with derivatives computations, using CRTP.

Base ComputeObject for the Basket classes.

Implements the compute methods for fitting: compute, computeWithIds, ... Checkout Fitting Module: User Manual for more details

The various implementations of Ponca::Concept are mixed through specializations of the BasketDiff and Basket classes:

using myFitDer =
BasketDiff <BasketType, // Existing Basket, to be differentiated
DiffType, // Differentiation space: FitScaleDer, FitSpaceDer, or
FitScaleDer|FitSpaceDer ComputationalDerivativesConcept1, // Implementation of ComputationalDerivativesConcept
ComputationalDerivativesConcept2, // Implementation of ComputationalDerivativesConcept
... , //
>; // Final structure to fit and derive a primitive over weighted samples
Aggregator class used to declare specialized structures with derivatives computations,...
Definition basket.h:230
Aggregator class used to declare specialized structures using CRTP.
Definition basket.h:294
DiffType
Flags defining which derivatives need to be computed.
Definition enums.h:34
@ FitSpaceDer
Flag indicating a space differentiation.
Definition enums.h:36
@ FitScaleDer
Flag indicating a scale differentiation.
Definition enums.h:35
Template Parameters
DerivedDerived class that provides the addNeighbor method (either Basket or BasketDiff)
BaseBase class that provides, through the CRTP the init, startNewPass, addNeighbor and finalize methods
BasketTypeExisting Basket, to be differentiated
TypeDifferentiation space: FitScaleDer, FitSpaceDer, or FitScaleDer|FitSpaceDer
Ext0Implements ComputationalDerivativesConcept
ExtsImplements ComputationalDerivativesConcept (optional)

Definition at line 227 of file basket.h.

Member Typedef Documentation

◆ Base

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
using Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::Base = typename internal::BasketDiffAggregate<BasketType, Type, Ext0, Exts...>::type

Definition at line 235 of file basket.h.

◆ DataPoint

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
using Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::DataPoint = typename BasketType::DataPoint

Point type used for computation.

Definition at line 239 of file basket.h.

◆ NeighborFilter

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
using Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::NeighborFilter = typename BasketType::NeighborFilter

Neighbor Filter.

Definition at line 237 of file basket.h.

◆ Scalar

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
using Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::Scalar = typename BasketType::Scalar

Scalar type used for computation, as defined from Basket.

Definition at line 241 of file basket.h.

◆ VectorType

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
using Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::VectorType = typename BasketType::VectorType

Vector type used for computation, as defined from Basket.

Definition at line 243 of file basket.h.

Member Function Documentation

◆ addLocalNeighbor()

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
void Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::addLocalNeighbor ( Scalar  _w,
const VectorType _localQ,
const DataPoint _nei,
typename Base::ScalarArray &  _dw 
)

Add a local neighbor to perform the fit.

When called directly, don't forget to call Fit::startNewPass when starting multiple passes

See also
compute Prefer when using a range of Points
computeWithIds Prefer when using a range of ids
Parameters
_wThe weight of the neighbor
_localQThe location expressed in local coordinates
_neiThe neighbor
_dwDerivative array
Returns
false if param nei is not a valid neighbor (weight = 0)

Definition at line 51 of file basket.hpp.

◆ addNeighbor()

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
bool Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::addNeighbor ( const DataPoint _nei)

Add a neighbor to perform the fit.

When called directly, don't forget to call Fit::startNewPass when starting multiple passes

See also
compute Prefer when using a range of Points
computeWithIds Prefer when using a range of ids
Returns
false if param nei is not a valid neighbor (weight = 0)

Definition at line 35 of file basket.hpp.

◆ finalize()

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
void Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::finalize ( )

Finalize the fitting procedure.

Definition at line 28 of file basket.hpp.

◆ init()

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
void Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::init ( )

Initialize the fit.

Definition at line 14 of file basket.hpp.

◆ startNewPass()

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
void Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::startNewPass ( )

Start a new iteration over neighbor.

/!\ Do not forget to use this function when multiple pass are needed

Definition at line 21 of file basket.hpp.