Changeset 2207:75a29ac69c19 in lemon-0.x for demo/graph_to_eps_demo.cc
- Timestamp:
- 09/07/06 15:27:16 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2933
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_to_eps_demo.cc
r2178 r2207 49 49 typedef ListGraph::NodeIt NodeIt; 50 50 typedef ListGraph::Edge Edge; 51 typedef xy<int> Xy;51 typedef dim2::Point<int> Point; 52 52 53 53 Node n1=g.addNode(); … … 57 57 Node n5=g.addNode(); 58 58 59 ListGraph::NodeMap< Xy> coords(g);59 ListGraph::NodeMap<Point> coords(g); 60 60 ListGraph::NodeMap<double> sizes(g); 61 61 ListGraph::NodeMap<int> colors(g); … … 64 64 ListGraph::EdgeMap<int> widths(g); 65 65 66 coords[n1]= Xy(50,50); sizes[n1]=1; colors[n1]=1; shapes[n1]=0;67 coords[n2]= Xy(50,70); sizes[n2]=2; colors[n2]=2; shapes[n2]=2;68 coords[n3]= Xy(70,70); sizes[n3]=1; colors[n3]=3; shapes[n3]=0;69 coords[n4]= Xy(70,50); sizes[n4]=2; colors[n4]=4; shapes[n4]=1;70 coords[n5]= Xy(85,60); sizes[n5]=3; colors[n5]=5; shapes[n5]=2;66 coords[n1]=Point(50,50); sizes[n1]=1; colors[n1]=1; shapes[n1]=0; 67 coords[n2]=Point(50,70); sizes[n2]=2; colors[n2]=2; shapes[n2]=2; 68 coords[n3]=Point(70,70); sizes[n3]=1; colors[n3]=3; shapes[n3]=0; 69 coords[n4]=Point(70,50); sizes[n4]=2; colors[n4]=4; shapes[n4]=1; 70 coords[n5]=Point(85,60); sizes[n5]=3; colors[n5]=5; shapes[n5]=2; 71 71 72 72 Edge e; … … 184 184 ListGraph h; 185 185 ListGraph::NodeMap<int> hcolors(h); 186 ListGraph::NodeMap< Xy> hcoords(h);186 ListGraph::NodeMap<Point> hcoords(h); 187 187 188 188 int cols=int(sqrt(double(palette.size()))); 189 189 for(int i=0;i<int(paletteW.size());i++) { 190 190 Node n=h.addNode(); 191 hcoords[n]= Xy(i%cols,i/cols);191 hcoords[n]=Point(i%cols,i/cols); 192 192 hcolors[n]=i; 193 193 }
Note: See TracChangeset
for help on using the changeset viewer.