Changeset 1268:a1f9a4d4ea0c in lemon-0.x for src/demo
- Timestamp:
- 03/27/05 17:59:04 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1695
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/demo/graph_to_eps_demo.cc
r1178 r1268 19 19 #include<lemon/maps.h> 20 20 #include<lemon/list_graph.h> 21 #include<lemon/graph_utils.h> 21 22 22 23 23 24 using namespace std; 24 25 using 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 };33 26 34 27 int main() … … 71 64 e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1; 72 65 73 IdMap id(g);66 IdMap<ListGraph,Node> id(g); 74 67 75 68 graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
Note: See TracChangeset
for help on using the changeset viewer.