我有一个图,我想将其类型更改为子图,以便能够将其划分为更多子图,从而使用 graphviz 获得更多的纵坐标打印。问题是当我将子图属性添加到我的图时,顶点描述符不再起作用。
修改前的代码:
#include "Node.cpp"
#include <boost/graph/adjacency_list.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/subgraph.hpp>
using namespace boost;
typedef adjacency_list<vecS, vecS, directedS, Node, property < edge_weight_t, float > > mygraph;
typedef graph_traits < mygraph >::vertex_descriptor vertex_descriptor;
...
将图改为子图后的代码:
#include "Node.cpp"
#include <boost/graph/adjacency_list.hpp>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/subgraph.hpp>
using namespace boost;
typedef subgraph<adjacency_list<vecS, vecS, directedS, Node, property < edge_weight_t, float > > >mygraph;
typedef graph_traits < mygraph >::vertex_descriptor vertex_descriptor; //ERROR
...
问题是什么?我该如何解决?