Ponca  40f245e28b920cbb763a1c6282156c87c626f24c
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::BasketComputeObject< _Derived, _Base > Struct Template Reference

Base ComputeObject for the Basket classes. More...

#include <basket.h>

+ Inheritance diagram for Ponca::BasketComputeObject< _Derived, _Base >:
+ Collaboration diagram for Ponca::BasketComputeObject< _Derived, _Base >:

Public Types

using Base = _Base
 
using Derived = _Derived
 <
 
using Scalar = typename Base::Scalar
 Alias to the Derived type.
 

Public Member Functions

template<typename IteratorBegin , typename IteratorEnd >
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.
 
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 Add neighbors stored in a PointContainer and sampled using indices stored in ids.
 
template<typename PointContainer >
FIT_RESULT computeMLS (const PointContainer &points, const int mlsIter=5, const Scalar epsilon=Eigen::NumTraits< Scalar >::dummy_precision())
 Computes the fit using the MLS iteration process.
 
template<typename IndexRange , typename PointContainer >
FIT_RESULT computeWithIdsMLS (const IndexRange &ids, const PointContainer &points, const int mlsIter=5, const Scalar epsilon=Eigen::NumTraits< Scalar >::dummy_precision())
 Computes the fit using the MLS iteration process.
 
- Public Member Functions inherited from Ponca::ComputeObject< _Derived >
FIT_RESULT compute (const Container &c)
 Convenience function for STL-like container.
 
FIT_RESULT compute (const IteratorBegin &, const IteratorEnd &)
 Convenience function for STL-like iterators.
 
FIT_RESULT computeWithIds (IndexRange, const PointContainer &)
 Convenience function to iterate over a subset of samples in a PointContainer.
 

Protected Member Functions

template<typename Func >
FIT_RESULT computeMLSImpl (Func &&computeFunc, int mlsIter, Scalar epsilon)
 Computes the fit using the MLS iteration process.
 
- 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 _Derived, typename _Base>
struct Ponca::BasketComputeObject< _Derived, _Base >

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:

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:284
DiffType
Flags defining which derivatives need to be computed.
Definition enums.h:34
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

Definition at line 145 of file basket.h.

Member Typedef Documentation

◆ Base

template<typename _Derived , typename _Base >
using Ponca::BasketComputeObject< _Derived, _Base >::Base = _Base

Definition at line 146 of file basket.h.

◆ Derived

template<typename _Derived , typename _Base >
using Ponca::BasketComputeObject< _Derived, _Base >::Derived = _Derived

<

Alias to the Base type

Definition at line 147 of file basket.h.

◆ Scalar

template<typename _Derived , typename _Base >
using Ponca::BasketComputeObject< _Derived, _Base >::Scalar = typename Base::Scalar

Alias to the Derived type.

Definition at line 148 of file basket.h.

Member Function Documentation

◆ compute()

template<typename _Derived , typename _Base >
template<typename IteratorBegin , typename IteratorEnd >
FIT_RESULT Ponca::BasketComputeObject< _Derived, _Base >::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 161 of file basket.h.

◆ computeMLS()

template<typename _Derived , typename _Base >
template<typename PointContainer >
FIT_RESULT Ponca::BasketComputeObject< _Derived, _Base >::computeMLS ( const PointContainer &  points,
const int  mlsIter = 5,
const Scalar  epsilon = Eigen::NumTraits<Scalar>::dummy_precision() 
)
inline

Computes the fit using the MLS iteration process.

The position of the projected point is outputted through the lastPosition argument.

Parameters
pointsAn STL-like container of points
mlsIterThe amount of MLS iteration that is being done for this fit
Returns
The result of the fit
Template Parameters
PointContainerSTL-like container storing the points

Definition at line 235 of file basket.h.

◆ computeMLSImpl()

template<typename _Derived , typename _Base >
template<typename Func >
FIT_RESULT Ponca::BasketComputeObject< _Derived, _Base >::computeMLSImpl ( Func &&  computeFunc,
int  mlsIter,
Scalar  epsilon 
)
inlineprotected

Computes the fit using the MLS iteration process.

The position of the projected point is outputted through the lastPosition argument.

Parameters
pointsAn STL-like container of points
mlsIterThe amount of MLS iteration that is being done for this fit
Returns
The result of the fit

Definition at line 208 of file basket.h.

◆ computeWithIds()

template<typename _Derived , typename _Base >
template<typename IndexRange , typename PointContainer >
FIT_RESULT Ponca::BasketComputeObject< _Derived, _Base >::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 184 of file basket.h.

◆ computeWithIdsMLS()

template<typename _Derived , typename _Base >
template<typename IndexRange , typename PointContainer >
FIT_RESULT Ponca::BasketComputeObject< _Derived, _Base >::computeWithIdsMLS ( const IndexRange &  ids,
const PointContainer &  points,
const int  mlsIter = 5,
const Scalar  epsilon = Eigen::NumTraits<Scalar>::dummy_precision() 
)
inline

Computes the fit using the MLS iteration process.

The position of the projected point is outputted through the lastPosition argument.

Parameters
pointsAn STL-like container of points
mlsIterThe amount of MLS iteration that is being done for this fit
Returns
The result of the fit
Template Parameters
IndexRangeSTL-Like range storing indices
PointContainerSTL-like container storing the points

Definition at line 252 of file basket.h.