OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
Classes | Public Types | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
IndexMap Class Reference

#include <IndexMap.h>

Classes

class  myCompare
 
class  OutOfBounds
 
struct  Range
 

Public Types

typedef Range key_t
 
typedef std::set
< std::shared_ptr< Component > > 
value_t
 

Public Member Functions

 IndexMap ()
 
void add (key_t::first_type initialStep, key_t::second_type finalStep, const value_t &val)
 
value_t query (key_t::first_type s, key_t::second_type ds)
 
void tidyUp (double zstop)
 
void print (std::ostream &) const
 
void saveSDDS (double startS) const
 
size_t size () const
 
size_t numElements () const
 
key_t getRange (const IndexMap::value_t::value_type &element, double position) const
 
value_t getTouchingElements (const key_t &range) const
 

Private Types

typedef std::map< key_t,
value_t, myCompare
map_t
 
typedef std::multimap
< value_t::value_type, key_t
invertedMap_t
 

Static Private Member Functions

static bool almostEqual (double, double)
 

Private Attributes

map_t mapRange2Element_m
 
invertedMap_t mapElement2Range_m
 
double totalPathLength_m
 

Static Private Attributes

static const double oneMinusEpsilon_m = 1.0 - std::numeric_limits<double>::epsilon()
 

Detailed Description

Definition at line 36 of file IndexMap.h.

Member Typedef Documentation

typedef std::multimap<value_t::value_type, key_t> IndexMap::invertedMap_t
private

Definition at line 95 of file IndexMap.h.

Definition at line 46 of file IndexMap.h.

typedef std::map<key_t, value_t, myCompare> IndexMap::map_t
private

Definition at line 94 of file IndexMap.h.

typedef std::set<std::shared_ptr<Component> > IndexMap::value_t

Definition at line 47 of file IndexMap.h.

Constructor & Destructor Documentation

IndexMap::IndexMap ( )

Definition at line 44 of file IndexMap.cpp.

Member Function Documentation

void IndexMap::add ( key_t::first_type  initialStep,
key_t::second_type  finalStep,
const value_t val 
)

Definition at line 113 of file IndexMap.cpp.

References almostEqual(), IndexMap::Range::end, it, mapElement2Range_m, mapRange2Element_m, oneMinusEpsilon_m, and totalPathLength_m.

Referenced by OrbitThreader::execute().

Here is the call graph for this function:

bool IndexMap::almostEqual ( double  x,
double  y 
)
staticprivate

Definition at line 410 of file IndexMap.cpp.

References abs(), and min().

Referenced by add(), and getTouchingElements().

Here is the call graph for this function:

IndexMap::key_t IndexMap::getRange ( const IndexMap::value_t::value_type element,
double  position 
) const

Definition at line 375 of file IndexMap.cpp.

References abs(), it, mapElement2Range_m, max(), and min().

Referenced by OrbitThreader::getRange().

Here is the call graph for this function:

IndexMap::value_t IndexMap::getTouchingElements ( const key_t range) const

Definition at line 396 of file IndexMap.cpp.

References almostEqual(), IndexMap::Range::begin, end, IndexMap::Range::end, it, and mapRange2Element_m.

Referenced by OrbitThreader::getTouchingElements().

Here is the call graph for this function:

size_t IndexMap::numElements ( ) const
void IndexMap::print ( std::ostream &  out) const

Definition at line 50 of file IndexMap.cpp.

References IndexMap::Range::begin, IndexMap::Range::end, endl(), floor(), log(), mapRange2Element_m, and max().

Referenced by operator<<().

Here is the call graph for this function:

IndexMap::value_t IndexMap::query ( key_t::first_type  s,
key_t::second_type  ds 
)

Definition at line 76 of file IndexMap.cpp.

References end, it, mapRange2Element_m, min(), and totalPathLength_m.

Referenced by OrbitThreader::query().

Here is the call graph for this function:

void IndexMap::saveSDDS ( double  startS) const
size_t IndexMap::size ( ) const
inline

Definition at line 106 of file IndexMap.h.

References mapRange2Element_m.

void IndexMap::tidyUp ( double  zstop)

Definition at line 148 of file IndexMap.cpp.

References IndexMap::Range::begin, and mapRange2Element_m.

Referenced by OrbitThreader::execute().

Member Data Documentation

invertedMap_t IndexMap::mapElement2Range_m
private

Definition at line 97 of file IndexMap.h.

Referenced by add(), getRange(), and saveSDDS().

map_t IndexMap::mapRange2Element_m
private

Definition at line 96 of file IndexMap.h.

Referenced by add(), getTouchingElements(), print(), query(), saveSDDS(), size(), and tidyUp().

const double IndexMap::oneMinusEpsilon_m = 1.0 - std::numeric_limits<double>::epsilon()
staticprivate

Definition at line 102 of file IndexMap.h.

Referenced by add().

double IndexMap::totalPathLength_m
private

Definition at line 99 of file IndexMap.h.

Referenced by add(), and query().


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