[Lemon-commits] [lemon_svn] alpar: r1695 - hugo/trunk/src/demo
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:47:03 CET 2006
Author: alpar
Date: Sun Mar 27 17:59:04 2005
New Revision: 1695
Modified:
hugo/trunk/src/demo/graph_to_eps_demo.cc
Log:
Use the standard idMap
Modified: hugo/trunk/src/demo/graph_to_eps_demo.cc
==============================================================================
--- hugo/trunk/src/demo/graph_to_eps_demo.cc (original)
+++ hugo/trunk/src/demo/graph_to_eps_demo.cc Sun Mar 27 17:59:04 2005
@@ -18,19 +18,12 @@
#include<lemon/graph_to_eps.h>
#include<lemon/maps.h>
#include<lemon/list_graph.h>
+#include<lemon/graph_utils.h>
using namespace std;
using namespace lemon;
-class IdMap :public MapBase<ListGraph::Node,int>
-{
- const ListGraph &g;
-public:
- IdMap(const ListGraph &_g) :g(_g) {}
- Value operator[](Key n) const { return g.id(n); }
-};
-
int main()
{
ColorSet colorSet;
@@ -70,7 +63,7 @@
e=g.addEdge(n2,n4); ecolors[e]=1; widths[e]=2;
e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1;
- IdMap id(g);
+ IdMap<ListGraph,Node> id(g);
graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
title("Sample .eps figure").
More information about the Lemon-commits
mailing list