2009-01-17から1日間の記事一覧

boost::bimapsのメモ

boostのbimapを使うと双方向アクセス可能なmapを使えるようになる.要素には,通常のsetのみではなく,multisetやvectorなどが利用できる.以下がサンプル. #include <iostream> #include <string> #include <boost/bimap/bimap.hpp> #include <boost/bimap/multiset_of.hpp> #include <boost/foreach.hpp> typedef boost::bimaps::multiset_of<int> int_set</int></boost/foreach.hpp></boost/bimap/multiset_of.hpp></boost/bimap/bimap.hpp></string></iostream>…