如何在助推图中添加自定义边缘标签?
问题描述:
我使用类型的提升图:如何在助推图中添加自定义边缘标签?
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;
现在我要补充刺痛型边缘标签图中的每个边缘,进一步我可以使用他们在我的计划,以区分不同类型的边缘。
请分享你的想法,在此先感谢。
答
您可以在新标签属性只是添加(删除命名空间)的边缘属性列表:
typedef property<edge_weight_t, slScoreValueType,
property<edge_name_t, string> >
slEdgeProperty;