OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <IndexMap.h>
Classes | |
class | myCompare |
class | OutOfBounds |
Public Types | |
typedef std::pair< double, double > | 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 |
std::pair< double, double > | getRange (const IndexMap::value_t::value_type &element, double position) const |
IndexMap::value_t | getTouchingElements (const std::pair< double, double > &range) |
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() |
Definition at line 14 of file IndexMap.h.
|
private |
Definition at line 67 of file IndexMap.h.
typedef std::pair<double, double> IndexMap::key_t |
Definition at line 17 of file IndexMap.h.
|
private |
Definition at line 66 of file IndexMap.h.
typedef std::set<std::shared_ptr<Component> > IndexMap::value_t |
Definition at line 18 of file IndexMap.h.
IndexMap::IndexMap | ( | ) |
Definition at line 21 of file IndexMap.cpp.
void IndexMap::add | ( | key_t::first_type | initialStep, |
key_t::second_type | finalStep, | ||
const value_t & | val | ||
) |
Definition at line 90 of file IndexMap.cpp.
References almostEqual(), mapElement2Range_m, mapRange2Element_m, oneMinusEpsilon_m, and totalPathLength_m.
Referenced by OrbitThreader::execute().
|
staticprivate |
Definition at line 385 of file IndexMap.cpp.
Referenced by add(), and getTouchingElements().
std::pair< double, double > IndexMap::getRange | ( | const IndexMap::value_t::value_type & | element, |
double | position | ||
) | const |
Definition at line 350 of file IndexMap.cpp.
References abs(), mapElement2Range_m, max(), and min().
Referenced by OrbitThreader::getRange().
IndexMap::value_t IndexMap::getTouchingElements | ( | const std::pair< double, double > & | range | ) |
Definition at line 371 of file IndexMap.cpp.
References almostEqual(), and mapRange2Element_m.
Referenced by OrbitThreader::getTouchingElements().
size_t IndexMap::numElements | ( | ) | const |
void IndexMap::print | ( | std::ostream & | out | ) | const |
Definition at line 27 of file IndexMap.cpp.
References endl(), floor(), log(), mapRange2Element_m, and max().
Referenced by operator<<().
IndexMap::value_t IndexMap::query | ( | key_t::first_type | s, |
key_t::second_type | ds | ||
) |
Definition at line 53 of file IndexMap.cpp.
References mapRange2Element_m, min(), and totalPathLength_m.
Referenced by OrbitThreader::query().
void IndexMap::saveSDDS | ( | double | startS | ) | const |
Definition at line 155 of file IndexMap.cpp.
References ElementPositionWriter::addRow(), OpalData::getInstance(), mapElement2Range_m, mapRange2Element_m, name, RFCAVITY, ElementBase::RFCAVITY, SIZE, and ElementBase::TRAVELINGWAVE.
Referenced by OrbitThreader::execute().
|
inline |
Definition at line 78 of file IndexMap.h.
References mapRange2Element_m.
void IndexMap::tidyUp | ( | double | zstop | ) |
Definition at line 125 of file IndexMap.cpp.
References mapRange2Element_m.
Referenced by OrbitThreader::execute().
|
private |
Definition at line 69 of file IndexMap.h.
Referenced by add(), getRange(), and saveSDDS().
|
private |
Definition at line 68 of file IndexMap.h.
Referenced by add(), getTouchingElements(), print(), query(), saveSDDS(), size(), and tidyUp().
|
staticprivate |
Definition at line 74 of file IndexMap.h.
Referenced by add().
|
private |
Definition at line 71 of file IndexMap.h.