1 #ifndef OPAL_INDEXMAP_H
2 #define OPAL_INDEXMAP_H
17 typedef std::pair<double, double>
key_t;
18 typedef std::set<std::shared_ptr<Component> >
value_t;
22 void add(key_t::first_type initialStep, key_t::second_type finalStep,
const value_t &val);
24 value_t query(key_t::first_type s, key_t::second_type ds);
28 void print(std::ostream&)
const;
34 double position)
const;
56 if (x.first < y.first)
return true;
58 if (x.first == y.first) {
59 if (x.second < y.second)
return true;
66 typedef std::map<key_t, value_t, myCompare>
map_t;
std::ostream & operator<<(std::ostream &os, const Attribute &attr)
std::pair< double, double > key_t
value_t query(key_t::first_type s, key_t::second_type ds)
std::ostream & getStream()
The base class for all OPAL exceptions.
OutOfBounds(const OutOfBounds &rhs)
OutOfBounds(const std::string &meth, const std::string &msg)
void add(key_t::first_type initialStep, key_t::second_type finalStep, const value_t &val)
size_t numElements() const
void saveSDDS(double startS) const
std::multimap< value_t::value_type, key_t > invertedMap_t
MMatrix< double > im(MMatrix< m_complex > mc)
T * value_type(const SliceIterator< T > &)
void print(std::ostream &) const
std::map< key_t, value_t, myCompare > map_t
std::pair< double, double > getRange(const IndexMap::value_t::value_type &element, double position) const
static bool almostEqual(double, double)
invertedMap_t mapElement2Range_m
static const double oneMinusEpsilon_m
void tidyUp(double zstop)
IndexMap::value_t getTouchingElements(const std::pair< double, double > &range)
std::set< std::shared_ptr< Component > > value_t
bool operator()(const key_t x, const key_t y) const