OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
IndexMap Class Reference

#include <IndexMap.h>

Collaboration diagram for IndexMap:
Collaboration graph

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
 
const ReferencePathModelgetReferencePathModel () 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, myComparemap_t
 
typedef std::multimap< value_t::value_type, key_tinvertedMap_t
 

Private Member Functions

void rebuildReferencePathModel () const
 

Static Private Member Functions

static bool almostEqual (double, double)
 

Private Attributes

map_t mapRange2Element_m
 
invertedMap_t mapElement2Range_m
 
ReferencePathModel referencePathModel_m
 
bool referencePathModelDirty_m
 
double totalPathLength_m
 

Static Private Attributes

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

Detailed Description

Definition at line 37 of file IndexMap.h.


Class Documentation

◆ IndexMap::Range

struct IndexMap::Range

Definition at line 39 of file IndexMap.h.

Collaboration diagram for IndexMap::Range:
Collaboration graph
Class Members
typedef double first_type
typedef double second_type
Class Members
first_type begin
second_type end

Member Typedef Documentation

◆ invertedMap_t

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

Definition at line 92 of file IndexMap.h.

◆ key_t

Definition at line 45 of file IndexMap.h.

◆ map_t

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

Definition at line 91 of file IndexMap.h.

◆ value_t

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

Definition at line 46 of file IndexMap.h.

Constructor & Destructor Documentation

◆ IndexMap()

IndexMap::IndexMap ( )

Definition at line 43 of file IndexMap.cpp.

Member Function Documentation

◆ add()

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

Definition at line 111 of file IndexMap.cpp.

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

Referenced by OrbitThreader::execute(), TEST(), and TEST_F().

Here is the call graph for this function:

◆ almostEqual()

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

Definition at line 389 of file IndexMap.cpp.

Referenced by add(), and getTouchingElements().

◆ getRange()

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

Definition at line 354 of file IndexMap.cpp.

References mapElement2Range_m.

Referenced by OrbitThreader::getRange().

◆ getReferencePathModel()

const ReferencePathModel & IndexMap::getReferencePathModel ( ) const
inline

Definition at line 107 of file IndexMap.h.

References rebuildReferencePathModel(), referencePathModel_m, and referencePathModelDirty_m.

Referenced by OrbitThreader::getReferencePathModel(), saveSDDS(), and TEST().

Here is the call graph for this function:

◆ getTouchingElements()

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

Definition at line 376 of file IndexMap.cpp.

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

Referenced by OrbitThreader::getTouchingElements().

Here is the call graph for this function:

◆ numElements()

size_t IndexMap::numElements ( ) const

◆ print()

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

Definition at line 50 of file IndexMap.cpp.

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

◆ query()

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

Definition at line 74 of file IndexMap.cpp.

References mapRange2Element_m, and totalPathLength_m.

Referenced by OrbitThreader::query().

◆ rebuildReferencePathModel()

void IndexMap::rebuildReferencePathModel ( ) const
private

Definition at line 160 of file IndexMap.cpp.

References ReferencePathModel::addSegment(), ReferencePathModel::clear(), mapRange2Element_m, referencePathModel_m, and referencePathModelDirty_m.

Referenced by getReferencePathModel().

Here is the call graph for this function:

◆ saveSDDS()

◆ size()

size_t IndexMap::size ( ) const
inline

Definition at line 105 of file IndexMap.h.

References mapRange2Element_m.

◆ tidyUp()

void IndexMap::tidyUp ( double  zstop)

Member Data Documentation

◆ mapElement2Range_m

invertedMap_t IndexMap::mapElement2Range_m
private

Definition at line 94 of file IndexMap.h.

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

◆ mapRange2Element_m

map_t IndexMap::mapRange2Element_m
private

◆ oneMinusEpsilon_m

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

Definition at line 102 of file IndexMap.h.

Referenced by add().

◆ referencePathModel_m

ReferencePathModel IndexMap::referencePathModel_m
mutableprivate

Definition at line 95 of file IndexMap.h.

Referenced by getReferencePathModel(), and rebuildReferencePathModel().

◆ referencePathModelDirty_m

bool IndexMap::referencePathModelDirty_m
mutableprivate

Definition at line 96 of file IndexMap.h.

Referenced by add(), getReferencePathModel(), rebuildReferencePathModel(), and tidyUp().

◆ totalPathLength_m

double IndexMap::totalPathLength_m
private

Definition at line 98 of file IndexMap.h.

Referenced by add(), and query().


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