OrderingReflectedGray Class Reference

#include <OrderingReflectedGray.h>

Inheritance diagram for OrderingReflectedGray:

Public Member Functions

 OrderingReflectedGray (const std::vector< int > &m)
 
int idFromRound (int round) const override
 
int roundFromId (int id) const override
 
int nextId (void) const override
 return next id based on the ordering More...
 
const char * name (void) const override
 
bool lastId (void) const override
 
int localIdFromRound (int round, int j) const override
 
- Public Member Functions inherited from Ordering
 Ordering (const std::vector< int > &m)
 
virtual ~Ordering (void)
 
virtual int idFromRound (int round) const =0
 
virtual int nextId (void) const =0
 return next id based on the ordering More...
 
virtual int roundFromId (int id) const =0
 
virtual const char * name (void) const =0
 
virtual bool lastId (void) const =0
 
virtual int initial (void) const
 
virtual int localIdFromRound (int round, int j) const =0
 
int dimensions (void) const
 
int distance (int i, int j) const
 
int localIdFromId (int id, int j) const
 
void print (void) const
 print ordering More...
 
const char * digits (void) const
 
int maxRound (void) const
 
void toInternalRepresentation_ (int i, std::vector< int > &g) const
 
int fromInternalRepresentation_ (const std::vector< int > &g) const
 
void incrementInternalRepresentation_ (void) const
 perform plain increment on internal representation More...
 

Additional Inherited Members

- Protected Attributes inherited from Ordering
int k_
 
std::vector< int > m_
 the maximum for each digit More...
 
char digits_ [256]
 
std::vector< int > g_
 the encoded format More...
 
std::vector< int > h_
 the integer in mixed-radix representation More...
 

Detailed Description

Ordering for multi-dimensional sensitivity based on a (m0, m1, m2 ...)-radix non-modular Gray code i.e. an ordering of integers where two successive values differ by only one digit and where the transitions 0 to m-1 and m-1 to 0 are not acceptable

#include <libpf/core/OrderingReflectedGray.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ OrderingReflectedGray()

OrderingReflectedGray::OrderingReflectedGray ( const std::vector< int > &  m)
explicit

Member Function Documentation

◆ idFromRound()

int OrderingReflectedGray::idFromRound ( int  round) const
overridevirtual

based on the algorithm from: Donald E. Knuth The Art of Computer Programming Volume 4, Fascicle 2 Generating All Tuples and Permutations, 2005 ISBN 0-201-85393-0

Implements Ordering.

◆ lastId()

bool OrderingReflectedGray::lastId ( void  ) const
overridevirtual
Returns
the last id based on the ordering

Implements Ordering.

◆ localIdFromRound()

int OrderingReflectedGray::localIdFromRound ( int  round,
int  j 
) const
overridevirtual
Returns
step in j-th dimension based on the ordering from serial round
Parameters
roundsequential counter
jdimension

Implements Ordering.

◆ name()

const char * OrderingReflectedGray::name ( void  ) const
overridevirtual
Returns
name of the ordering

Implements Ordering.

◆ nextId()

int OrderingReflectedGray::nextId ( void  ) const
overridevirtual

return next id based on the ordering

Implements Ordering.

◆ roundFromId()

int OrderingReflectedGray::roundFromId ( int  id) const
overridevirtual
Returns
serial round from id based on the ordering
Parameters
idordered counter

Implements Ordering.


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