Bidirectional map between key-and-values of type X and Y inspired by C++ Boost Bimap (boost::bimap). Map-type defaults to a builtin associative array (AA).
Clear contents.
Check if (x, y) is stored.
Check if empty.
Insert (x, y).
Access to left map must be non-mutating.
Get length.
Access to right map must be non-mutating.
test with builtin associative arrays
alias HashMap(Key, Value) = Value[Key]; BiMap!(size_t, string, HashMap) bm; bm.insert(42, "42"); assert(bm.left.length == 1); assert(bm.right.length == 1); assert(bm.contains(42, "42")); bm.clear(); assert(bm.empty);
http://www.boost.org/doc/libs/1_65_1/libs/bimap/doc/html/boost_bimap/one_minute_tutorial.html
See Implementation
Bidirectional map between key-and-values of type X and Y inspired by C++ Boost Bimap (boost::bimap). Map-type defaults to a builtin associative array (AA).