Helios++
Helios software for LiDAR simulations
SurfaceInspector::maths::permuters::IPermuter< T > Class Template Referenceabstract

Permuter interface provides methods to iterate over different permutation configurations. It is an interface, which means it cannot be directly instantiated. It must be implemented by concrete classes which implement its functions depending on the type of desired permutations. More...

#include <IPermuter.hpp>

Inheritance diagram for SurfaceInspector::maths::permuters::IPermuter< T >:
Collaboration diagram for SurfaceInspector::maths::permuters::IPermuter< T >:

Public Member Functions

virtual void start ()=0
 Set permuter to its initial state.
 
virtual bool hasNext ()=0
 Check if there are permutations left to do. It can be used to restart a permuter. More...
 
virtual vector< T > next ()=0
 Obtain next permutation. More...
 
virtual vector< T > get ()=0
 Obtain the current permutation. More...
 

Detailed Description

template<typename T>
class SurfaceInspector::maths::permuters::IPermuter< T >

Permuter interface provides methods to iterate over different permutation configurations. It is an interface, which means it cannot be directly instantiated. It must be implemented by concrete classes which implement its functions depending on the type of desired permutations.

Template Parameters
TType of data to permute

Member Function Documentation

◆ get()

template<typename T >
virtual vector<T> SurfaceInspector::maths::permuters::IPermuter< T >::get ( )
pure virtual

Obtain the current permutation.

For instance, in following code, permA will be equal to permB and permB will be different than permC

IPermuter<T> permuter = ...;
permuter.start();
vector<T> permA = permuter.next();
vector<T> permB = permuter.get();
vector<T> permC = permuter.next();
Returns
Current permutation
See also
IPermuter::start
IPermuter::next

Implemented in SurfaceInspector::maths::permuters::CNRIndexPermuter< T >.

◆ hasNext()

template<typename T >
virtual bool SurfaceInspector::maths::permuters::IPermuter< T >::hasNext ( )
pure virtual

Check if there are permutations left to do. It can be used to restart a permuter.

Returns
True if there are more permutations to do, false otherwise

Implemented in SurfaceInspector::maths::permuters::CNRIndexPermuter< T >.

◆ next()

template<typename T >
virtual vector<T> SurfaceInspector::maths::permuters::IPermuter< T >::next ( )
pure virtual

Obtain next permutation.

The first time next is called, or whenever it is called after invoking start method, the first permutation is returned. The second time it is called, the second permutation is returned.

Returns
Vector representing a permutation. Empty vector when there are no more permutations left.
See also
IPermuter::start
IPermuter::get

Implemented in SurfaceInspector::maths::permuters::CNRIndexPermuter< T >.


The documentation for this class was generated from the following file: