Ponca  80e34c4ed3322bafe25349c3ea7523ca4a3aa60d
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::ComputeObject< Derived > Struct Template Reference

ComputeObject is a virtual object that represents an algorithm which can be used with the compute functions. More...

#include <compute.h>

+ Inheritance diagram for Ponca::ComputeObject< Derived >:
+ Collaboration diagram for Ponca::ComputeObject< Derived >:

Public Member Functions

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.
 

Protected Member Functions

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>
struct Ponca::ComputeObject< Derived >

ComputeObject is a virtual object that represents an algorithm which can be used with the compute functions.

The compute(begin, end) and computeWithIds(ids, points) methods must be implemented by the inheriting class.

Note
The compute(container) that is defined in this structure can be reused in the inheriting class by adding "using ComputeObject<Self>::compute;" to make it accessible

Definition at line 21 of file compute.h.

Member Function Documentation

◆ compute() [1/2]

template<typename Derived >
template<typename Container >
FIT_RESULT Ponca::ComputeObject< Derived >::compute ( const Container &  c)
inline

Convenience function for STL-like container.

Note
This method is only accessible when using a CPU architecture (PONCA_CPU_ARCH = true)
Template Parameters
ContainerAnd STL-Like container
See also
compute(const IteratorBegin& begin, const IteratorEnd& end)

Definition at line 36 of file compute.h.

◆ compute() [2/2]

template<typename Derived >
template<typename IteratorBegin , typename IteratorEnd >
FIT_RESULT Ponca::ComputeObject< Derived >::compute ( const IteratorBegin &  ,
const IteratorEnd &   
)
inline

Convenience function for STL-like iterators.

Template Parameters
IteratorBeginThe beginning of the iterator (std::begin(iterator)
IteratorEndThe end of the iterator (std::end(iterator)

Definition at line 46 of file compute.h.

◆ computeWithIds()

template<typename Derived >
template<typename IndexRange , typename PointContainer >
FIT_RESULT Ponca::ComputeObject< Derived >::computeWithIds ( IndexRange  ,
const PointContainer &   
)
inline

Convenience function to iterate over a subset of samples in a PointContainer.

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 56 of file compute.h.

◆ derived()

template<typename Derived >
Derived & Ponca::ComputeObject< Derived >::derived ( )
inlineprotected

Retrieve the top layer object Returns a reference to the derived class so that we can use its overwritten methods.

Definition at line 25 of file compute.h.