2013-03-28から1日間の記事一覧

C++ 双方向マップ boost::bimaps 覚え書き

双方向のからアクセス可能なmapとしてboost::bimapsがあります。 今回はそのboost::bimapsの覚え書きです。 まずは単純な1対1の双方向mapとして使う場合 #include <string> #include <iostream> #include <boost/bimap/bimap.hpp> int main() { // int : string の1対1のmap typedef boost::bimaps::bi</boost/bimap/bimap.hpp></iostream></string>…