#include <Ordering.h>

Inheritance diagram for Ordering:

Public Member Functions

 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...
 

Protected Attributes

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

Abstract interface for multi-dimensional sensitivity ordering

#include <libpf/core/Ordering.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ Ordering()

Ordering::Ordering ( const std::vector< int > &  m)
explicit
Parameters
mvector of integer with number or steps in each dimension; should be less than 256 in size

◆ ~Ordering()

virtual Ordering::~Ordering ( void  )
inlinevirtual

Member Function Documentation

◆ digits()

const char * Ordering::digits ( void  ) const
Returns
current point in mixed-radix representation

◆ dimensions()

int Ordering::dimensions ( void  ) const
Returns
the number of dimensions

◆ distance()

int Ordering::distance ( int  i,
int  j 
) const

calculate the distance between two points based on the infinity-norm, i.e. the positive integer obtained as the maximum absolute value of the difference of any digit

Returns
distance from first to second point, based on infinity-norm
Parameters
ifirst point
jsecond point

◆ fromInternalRepresentation_()

int Ordering::fromInternalRepresentation_ ( const std::vector< int > &  g) const

convert internal representation to point

Returns
point
Parameters
[in]ginternal representation, MSD is k_ - 1, LSD is 0

◆ idFromRound()

virtual int Ordering::idFromRound ( int  round) const
pure virtual
Returns
id based on the ordering from serial round
Parameters
roundsequential counter

Implemented in OrderingLexicographical, OrderingReflectedGray, and OrderingSpiral.

◆ incrementInternalRepresentation_()

void Ordering::incrementInternalRepresentation_ ( void  ) const

perform plain increment on internal representation

◆ initial()

virtual int Ordering::initial ( void  ) const
virtual
Returns
the first id based on the ordering

Reimplemented in OrderingSpiral.

◆ lastId()

virtual bool Ordering::lastId ( void  ) const
pure virtual
Returns
the last id based on the ordering

Implemented in OrderingLexicographical, OrderingReflectedGray, and OrderingSpiral.

◆ localIdFromId()

int Ordering::localIdFromId ( int  id,
int  j 
) const

return step in j-th dimension based on the ordering from ordered counter

Parameters
idordered counter
jdimension

◆ localIdFromRound()

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

Implemented in OrderingLexicographical, OrderingReflectedGray, and OrderingSpiral.

◆ maxRound()

int Ordering::maxRound ( void  ) const
Returns
the number of total rows of the sensitivity, i.e. the product of the maximum for each digit

◆ name()

virtual const char * Ordering::name ( void  ) const
pure virtual
Returns
name of the ordering

Implemented in OrderingLexicographical, OrderingReflectedGray, and OrderingSpiral.

◆ nextId()

virtual int Ordering::nextId ( void  ) const
pure virtual

return next id based on the ordering

Implemented in OrderingLexicographical, OrderingReflectedGray, and OrderingSpiral.

◆ print()

void Ordering::print ( void  ) const

print ordering

◆ roundFromId()

virtual int Ordering::roundFromId ( int  id) const
pure virtual
Returns
serial round from id based on the ordering
Parameters
idordered counter

Implemented in OrderingLexicographical, OrderingReflectedGray, and OrderingSpiral.

◆ toInternalRepresentation_()

void Ordering::toInternalRepresentation_ ( int  i,
std::vector< int > &  g 
) const

convert point i to internal representation

Parameters
[in]ipoint to convert
[out]ginternal representation, MSD is k_ - 1, LSD is 0

Member Data Documentation

◆ digits_

char Ordering::digits_[256]
mutableprotected

◆ g_

std::vector<int> Ordering::g_
mutableprotected

the encoded format

◆ h_

std::vector<int> Ordering::h_
mutableprotected

the integer in mixed-radix representation

◆ k_

int Ordering::k_
protected

◆ m_

std::vector<int> Ordering::m_
protected

the maximum for each digit


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