0

I am using boost graph of type:

namespace boost {
      struct computable_object_t
  {
    typedef vertex_property_tag kind;
  };
}

typedef boost::property<boost::vertex_index_t, unsigned int,
                        boost::property<boost::computable_object_t,
                                        plComputableObject*> > slVertexProperty;

typedef boost::property<boost::edge_weight_t, slScoreValueType> slEdgeProperty;

typedef boost::adjacency_list<boost::vecS, boost::listS, boost::bidirectionalS,
                              slVertexProperty, slEdgeProperty> slGraph;

Now i have to add sting type edge label for each edge of the graph, further i could use them in my program to distinguish different kind of edges.

Please share you idea, thanks in advance.

4

1 回答 1

1

您可以将该新标签属性添加到边缘属性列表(已删除命名空间):

typedef property<edge_weight_t, slScoreValueType,
          property<edge_name_t, string> >
        slEdgeProperty;
于 2012-02-09T05:44:43.903 回答