C++;LEMON图形库-使用graphToEps()显示弧/边贴图 使用C++库,我试图用附带的边(或弧)权重来可视化A,没有运气。以下是迄今为止我在main()中得到的信息: // Create graph and init maps GridGraph g = GridGraph(5, 5); GridGraph::NodeMap<Point> coords(g); GridGraph::EdgeMap<int> weights(g, 1); // Set positions of nodes for graphToEps use for(GridGraph::NodeIt u(g); u != INVALID; ++u ) { coords[u] = g.pos(u); } cout << "Create 'graph.eps'" << endl; graphToEps(g,"graph.eps"). coords(coords). title("Sample .eps figure"). run(); //创建图形和初始化映射 GridGraph g=GridGraph(5,5); 网格图::节点映射坐标(g); GridGraph::EdgeMap权重(g,1); //设置节点的位置以供graphToEps使用 for(GridGraph::NodeIt u(g);u!=无效;++u){ 坐标[u]=g.pos(u); } cout
似乎没有一种内置的方法来实现这一点。 最后我连接到graphToEps的一部分,它打印节点文本,然后才知道在哪里放置所有边的文本。所有边都像节点一样“打印” 今年晚些时候我可能会提出一个请求C++;LEMON图形库-使用graphToEps()显示弧/边贴图 使用C++库,我试图用附带的边(或弧)权重来可视化A,没有运气。以下是迄今为止我在main()中得到的信息: // Create graph and init maps GridGraph g = GridGraph(5, 5); GridGraph::NodeMap<Point> coords(g); GridGraph::EdgeMap<int> weights(g, 1); // Set positions of nodes for graphToEps use for(GridGraph::NodeIt u(g); u != INVALID; ++u ) { coords[u] = g.pos(u); } cout << "Create 'graph.eps'" << endl; graphToEps(g,"graph.eps"). coords(coords). title("Sample .eps figure"). run(); //创建图形和初始化映射 GridGraph g=GridGraph(5,5); 网格图::节点映射坐标(g); GridGraph::EdgeMap权重(g,1); //设置节点的位置以供graphToEps使用 for(GridGraph::NodeIt u(g);u!=无效;++u){ 坐标[u]=g.pos(u); } cout,c++,graph,visualization,lemon-graph-library,C++,Graph,Visualization,Lemon Graph Library,似乎没有一种内置的方法来实现这一点。 最后我连接到graphToEps的一部分,它打印节点文本,然后才知道在哪里放置所有边的文本。所有边都像节点一样“打印” 今年晚些时候我可能会提出一个请求