OrderingSpiral Class Reference

#include <OrderingSpiral.h>

Inheritance diagram for OrderingSpiral:

Public Member Functions

 OrderingSpiral (const std::vector< int > &m, int initial)
 
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
 
int initial (void) 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 quasi-spiral that tries to monotonically increase the distance from the initial point while keeping the distance of each point from the previous one (if possible) equal to 1, based on: P. Greppi, E. Arato "Efficient computation paths for the systematic analysis of sensitivities" submitted to Computer Physics Communications journal

#include <libpf/core/OrderingSpiral.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ OrderingSpiral()

OrderingSpiral::OrderingSpiral ( const std::vector< int > &  m,
int  initial 
)
explicit
Parameters
mvector of integer with number or steps in each dimension; should be less than 256 in size
initialpoint where the quasi-spiral should start

Member Function Documentation

◆ idFromRound()

int OrderingSpiral::idFromRound ( int  round) const
overridevirtual
Returns
id based on the ordering from serial round
Parameters
roundsequential counter

Implements Ordering.

◆ initial()

int OrderingSpiral::initial ( void  ) const
overridevirtual
Returns
the first id based on the ordering

Reimplemented from Ordering.

◆ lastId()

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

Implements Ordering.

◆ localIdFromRound()

int OrderingSpiral::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 * OrderingSpiral::name ( void  ) const
overridevirtual
Returns
name of the ordering

Implements Ordering.

◆ nextId()

int OrderingSpiral::nextId ( void  ) const
overridevirtual

return next id based on the ordering

Implements Ordering.

◆ roundFromId()

int OrderingSpiral::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: