更新时间:2022-12-11 17:21:46
看起来这只是因为我不graphviz的正确理解。下面code和预期一样:
Looks like this was just because I didn't understand graphviz properly. The following code worked as expected:
std::ofstream outf("test.dot");
boost::dynamic_properties dp;
dp.property("label", boost::get(&Vertex::name, test));
dp.property("node_id", boost::get(boost::vertex_index, test));
dp.property("label", boost::get(&Edge::probability, test));
write_graphviz_dp(outf, test, dp);