COIN-OR::LEMON - Graph Library

Changeset 1268:a1f9a4d4ea0c in lemon-0.x


Ignore:
Timestamp:
03/27/05 17:59:04 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1695
Message:

Use the standard idMap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/demo/graph_to_eps_demo.cc

    r1178 r1268  
    1919#include<lemon/maps.h>
    2020#include<lemon/list_graph.h>
     21#include<lemon/graph_utils.h>
    2122
    2223
    2324using namespace std;
    2425using namespace lemon;
    25 
    26 class IdMap :public MapBase<ListGraph::Node,int>
    27 {
    28   const ListGraph &g;
    29 public:
    30   IdMap(const ListGraph &_g) :g(_g) {}
    31   Value operator[](Key n) const { return g.id(n); }
    32 };
    3326
    3427int main()
     
    7164  e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1;
    7265 
    73   IdMap id(g);
     66  IdMap<ListGraph,Node> id(g);
    7467
    7568  graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
Note: See TracChangeset for help on using the changeset viewer.