|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Simple bidirectional map with lookup in both directions. More...
#include <BiMap.h>

Classes | |
| struct | left_view |
| Left-map view with find/at helpers. More... | |
| struct | relation |
| Pair relation used for initialization. More... | |
| struct | right_view |
| Right-map view with find/at helpers. More... | |
Public Types | |
| using | left_map = std::map< Left, Right > |
| using | right_map = std::map< Right, Left > |
Public Member Functions | |
| BiMap () | |
| Construct an empty bimap. | |
| void | insert (const Left &left, const Right &right) |
| Insert or overwrite a left/right association. | |
| left_map::iterator | left_find (const Left &key) |
| Find an entry by left key. | |
| right_map::iterator | right_find (const Right &key) |
| Find an entry by right key. | |
| left_map::iterator | left_end () |
| End iterator for left map. | |
| right_map::iterator | right_end () |
| End iterator for right map. | |
| const Right & | left_at (const Left &key) const |
| Get mapped right value by left key (throws if missing). | |
| const Left & | right_at (const Right &key) const |
| Get mapped left value by right key (throws if missing). | |
Public Attributes | |
| left_view | left |
| Left view accessor. | |
| right_view | right |
| Right view accessor. | |
Private Attributes | |
| left_map | left_map_ |
| right_map | right_map_ |
Simple bidirectional map with lookup in both directions.
| Left | Key type for the left map. |
| Right | Key type for the right map. |
| using BiMap< Left, Right >::left_map = std::map<Left, Right> |
| using BiMap< Left, Right >::right_map = std::map<Right, Left> |
|
inline |
Insert or overwrite a left/right association.
| left | Input: left key. |
| right | Input: right key. |
Definition at line 99 of file BiMap.h.
References BiMap< Left, Right >::left, BiMap< Left, Right >::left_map_, BiMap< Left, Right >::right, and BiMap< Left, Right >::right_map_.
Referenced by make_bimap(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inline |
|
inline |
End iterator for left map.
Definition at line 116 of file BiMap.h.
References BiMap< Left, Right >::left_map_.
Referenced by TEST_F().
|
inline |
Find an entry by left key.
| key | Input: left key. |
end(). Definition at line 107 of file BiMap.h.
References BiMap< Left, Right >::left_map_.
Referenced by TEST_F().
|
inline |
|
inline |
End iterator for right map.
Definition at line 119 of file BiMap.h.
References BiMap< Left, Right >::right_map_.
Referenced by TEST_F().
|
inline |
Find an entry by right key.
| key | Input: right key. |
end(). Definition at line 112 of file BiMap.h.
References BiMap< Left, Right >::right_map_.
Referenced by TEST_F().
Left view accessor.
Definition at line 92 of file BiMap.h.
Referenced by RFCavity::getCavityTypeString(), Option::getDumpFrameString(), ParticleProperties::getParticleTypeString(), TrackRun::getRunMethodName(), BiMap< Left, Right >::insert(), and TEST_F().
Definition at line 35 of file BiMap.h.
Referenced by BiMap< Left, Right >::insert(), BiMap< Left, Right >::left_at(), BiMap< Left, Right >::left_end(), and BiMap< Left, Right >::left_find().
| right_view BiMap< Left, Right >::right |
Right view accessor.
Definition at line 94 of file BiMap.h.
Referenced by ParticleProperties::getParticleType(), Option::handlePsDumpFrame(), BiMap< Left, Right >::insert(), RFCavity::setCavityType(), TrackRun::setRunMethod(), and TEST_F().
Definition at line 36 of file BiMap.h.
Referenced by BiMap< Left, Right >::insert(), BiMap< Left, Right >::right_at(), BiMap< Left, Right >::right_end(), and BiMap< Left, Right >::right_find().