implements both sides mapping from the collection to (0,size(collection)) interval. More...
#include <bimap.hpp>
Public Types | |
typedef TToID::const_iterator | Iterator |
Public Member Functions | |
template<typename Range > | |
bimap (Range &&range) | |
constructor More... | |
Idx | get_idx (const T &t) const |
gets index of element t More... | |
const T & | get_val (Idx i) const |
get value for index i More... | |
std::size_t | size () const |
number of elements More... | |
Idx | add (const T &t) |
adds element to collection More... | |
std::pair< Iterator, Iterator > | get_range () const |
get range of all element, index pairs More... | |
Protected Attributes | |
std::vector< T > | m_id_to_t |
mapping from id to element | |
TToID | m_t_to_id |
mapping from elements to ids | |
implements both sides mapping from the collection to (0,size(collection)) interval.
T | |
Idx |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |