Use the standard idMap
authoralpar
Sun, 27 Mar 2005 15:59:04 +0000
changeset 1268a1f9a4d4ea0c
parent 1267 a93f94dbe3d3
child 1269 4c63ff4e16fa
Use the standard idMap
src/demo/graph_to_eps_demo.cc
     1.1 --- a/src/demo/graph_to_eps_demo.cc	Fri Mar 25 23:31:57 2005 +0000
     1.2 +++ b/src/demo/graph_to_eps_demo.cc	Sun Mar 27 15:59:04 2005 +0000
     1.3 @@ -18,19 +18,12 @@
     1.4  #include<lemon/graph_to_eps.h>
     1.5  #include<lemon/maps.h>
     1.6  #include<lemon/list_graph.h>
     1.7 +#include<lemon/graph_utils.h>
     1.8  
     1.9  
    1.10  using namespace std;
    1.11  using namespace lemon;
    1.12  
    1.13 -class IdMap :public MapBase<ListGraph::Node,int>
    1.14 -{
    1.15 -  const ListGraph &g;
    1.16 -public:
    1.17 -  IdMap(const ListGraph &_g) :g(_g) {}
    1.18 -  Value operator[](Key n) const { return g.id(n); }
    1.19 -};
    1.20 -
    1.21  int main()
    1.22  {
    1.23    ColorSet colorSet;
    1.24 @@ -70,7 +63,7 @@
    1.25    e=g.addEdge(n2,n4); ecolors[e]=1; widths[e]=2;
    1.26    e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1;
    1.27    
    1.28 -  IdMap id(g);
    1.29 +  IdMap<ListGraph,Node> id(g);
    1.30  
    1.31    graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
    1.32      title("Sample .eps figure").