Changeset 209:765619b7cbb2 in lemon-1.2 for demo/graph_to_eps_demo.cc
- Timestamp:
- 07/13/08 20:51:02 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_to_eps_demo.cc
r206 r209 1 /* -*- C++-*-2 * 3 * This file is a part of LEMON, a generic C++ optimization library 1 /* -*- mode: C++; indent-tabs-mode: nil; -*- 2 * 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 5 * Copyright (C) 2003-2008 … … 50 50 typedef ListDigraph::Arc Arc; 51 51 typedef dim2::Point<int> Point; 52 52 53 53 Node n1=g.addNode(); 54 54 Node n2=g.addNode(); … … 63 63 ListDigraph::ArcMap<int> acolors(g); 64 64 ListDigraph::ArcMap<int> widths(g); 65 65 66 66 coords[n1]=Point(50,50); sizes[n1]=1; colors[n1]=1; shapes[n1]=0; 67 67 coords[n2]=Point(50,70); sizes[n2]=2; colors[n2]=2; shapes[n2]=2; … … 69 69 coords[n4]=Point(70,50); sizes[n4]=2; colors[n4]=4; shapes[n4]=1; 70 70 coords[n5]=Point(85,60); sizes[n5]=3; colors[n5]=5; shapes[n5]=2; 71 71 72 72 Arc a; 73 73 … … 79 79 a=g.addArc(n2,n4); acolors[a]=1; widths[a]=2; 80 80 a=g.addArc(n3,n4); acolors[a]=2; widths[a]=1; 81 81 82 82 IdMap<ListDigraph,Node> id(g); 83 83 … … 183 183 ListDigraph::NodeMap<int> hcolors(h); 184 184 ListDigraph::NodeMap<Point> hcoords(h); 185 185 186 186 int cols=int(sqrt(double(palette.size()))); 187 187 for(int i=0;i<int(paletteW.size());i++) { … … 190 190 hcolors[n]=i; 191 191 } 192 192 193 193 cout << "Create 'graph_to_eps_demo_out_6_colors.eps'" << endl; 194 194 graphToEps(h,"graph_to_eps_demo_out_6_colors.eps"). … … 203 203 nodeColors(composeMap(paletteW,hcolors)). 204 204 run(); 205 205 206 206 return 0; 207 207 }
Note: See TracChangeset
for help on using the changeset viewer.