Ponca  e26a0e88a45818354616c1a7180bcd203aecad3c
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
 Base type, which aggregates all the computational objects using the CRTP.
 
using WeightFunction = typename BasketType::WeightFunction
 Weighting function.
 
using DataPoint = typename BasketType::DataPoint
 Point type used for computation.
 
using Scalar = typename DataPoint::Scalar
 Scalar type used for computation, as defined from Basket.
 

Public Member Functions

template<typename IteratorBegin , typename IteratorEnd >
FIT_RESULT compute (const IteratorBegin &begin, const IteratorEnd &end)
 Convenience function for STL-like iterators

 
template<typename IndexRange , typename PointContainer >
FIT_RESULT computeWithIds (IndexRange ids, const PointContainer &points)
 Convenience function to iterate over a subset of samples in a PointContainer

 
template<typename Container >
FIT_RESULT compute (const Container &c)
 Convenience function for STL-like iterators


 
bool addNeighbor (const DataPoint &_nei)
 Add a neighbor to perform the fit.
 

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.

This is one of the central classes of the library (even if it does not perform any computation on its own). Checkout Fitting Module: User Manual for more details, and Basket class.

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

typedef
BasketDiff <BasketType, // Existing Basket, to be differentiated
DiffType, // Differentiation space: FitScaleDer, FitSpaceDer, or FitScaleDer|FitSpaceDer
ComputationalDerivativesConcept1, // Implementation of ComputationalDerivativesConcept
ComputationalDerivativesConcept2, // Implementation of ComputationalDerivativesConcept
... , //
> myFitDer; // Final structure to fit and derive a primitive over weighted samples
Aggregator class used to declare specialized structures with derivatives computations,...
Definition: basket.h:153
DiffType
Flags defining which derivatives need to be computed.
Definition: enums.h:34
See also
Basket for the aggregation of ComputationalObjectConcept
Template Parameters
BasketTypeExisting Basket, to be differentiated
TypeDifferentiation space: FitScaleDer, FitSpaceDer, or FitScaleDer|FitSpaceDer
Ext0Implements ComputationalDerivativesConcept
ExtsImplements ComputationalDerivativesConcept (optional)

Definition at line 153 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

Base type, which aggregates all the computational objects using the CRTP.

Definition at line 158 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 162 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 DataPoint::Scalar

Scalar type used for computation, as defined from Basket.

Definition at line 164 of file basket.h.

◆ WeightFunction

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 >::WeightFunction = typename BasketType::WeightFunction

Weighting function.

Definition at line 160 of file basket.h.

Member Function Documentation

◆ 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)
inline

Add a neighbor to perform the fit.

When called directly, don't forget to call PrimitiveBase::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 169 of file basket.h.

◆ compute() [1/2]

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
template<typename Container >
FIT_RESULT Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::compute ( const Container &  c)
inline

Convenience function for STL-like iterators

Add neighbors stored in a container using STL-like iterators, and call finalize at the end.

The fit is evaluated multiple time if needed (see NEED_OTHER_PASS)

See also
addNeighbor()

Definition at line 166 of file basket.h.

◆ compute() [2/2]

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
template<typename IteratorBegin , typename IteratorEnd >
FIT_RESULT Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::compute ( const IteratorBegin &  begin,
const IteratorEnd &  end 
)
inline

Convenience function for STL-like iterators

Add neighbors stored in a container using STL-like iterators, and call finalize at the end.

The fit is evaluated multiple time if needed (see NEED_OTHER_PASS)

See also
addNeighbor()

Definition at line 166 of file basket.h.

◆ computeWithIds()

template<typename BasketType , int Type, template< class, class, int, typename > class Ext0, template< class, class, int, typename > class... Exts>
template<typename IndexRange , typename PointContainer >
FIT_RESULT Ponca::BasketDiff< BasketType, Type, Ext0, Exts >::computeWithIds ( IndexRange  ids,
const PointContainer &  points 
)
inline

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.

Template Parameters
IndexRangeSTL-Like range storing indices of the neighbors
PointContainerSTL-like container storing the points
See also
compute(const IteratorBegin& begin, const IteratorEnd& end)

Definition at line 166 of file basket.h.