Boost.Graphのタグとかプロパティとか

卒論で回りくどいと思ったりしたところ


・adjacency_listの辺や頂点には、自ら定義したプロパティも付加できる。

//おれおれタグ
struct hoge_t
{
    typedef vertex_property_tag kind;
};
typedef adjacency_list< vecS, vecS, directedS,
                        property<hoge_t, double>,
                        property<edge_weight_t, int>
                        > Graph;
//プロパティマップ取得も標準で用意されてるのと同様に可能!
Graph g;
property_map<Graph,hoge_t>::type hoge_map = get( hoge_t() , g );


・同じグラフに複数のプロパティを付加する事が出来る。
propertyのNextPropertyパラメータに、更にpropertyを指定する。
プロパティマップの取得は上と同様に可能。

//ネストネスト!きめぇ!
typedef property<vertex_distance_t, float, 
                 property<vertex_name_t, std::string ,
                          property< hoge_t , double> > > VertexProperty;

typedef adjacency_list< vecS, vecS, directedS,
                        VertexProperty,
                        property<edge_weight_t, int>
                        > Graph;


卒論ではGraphに振り回されたというよりか、
プロパティマップの考え方が理解出来なかったため、Graphを使うのがしんどかったという感じです。
Boost.Graphをこれから触る方は、プロパティマップを理解してからの方がいいかも?かもかも?