demo/graph_to_eps_demo.cc
 changeset 209 765619b7cbb2 parent 206 4e22275a2b52 child 211 542dd614cbb4
1.1 --- a/demo/graph_to_eps_demo.cc	Sun Jul 13 16:46:56 2008 +0100
1.2 +++ b/demo/graph_to_eps_demo.cc	Sun Jul 13 19:51:02 2008 +0100
1.3 @@ -1,6 +1,6 @@
1.4 -/* -*- C++ -*-
1.5 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
1.6   *
1.7 - * This file is a part of LEMON, a generic C++ optimization library
1.8 + * This file is a part of LEMON, a generic C++ optimization library.
1.9   *
1.11   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.12 @@ -49,7 +49,7 @@
1.13    typedef ListDigraph::NodeIt NodeIt;
1.14    typedef ListDigraph::Arc Arc;
1.15    typedef dim2::Point<int> Point;
1.16 -
1.17 +
1.21 @@ -62,13 +62,13 @@
1.22    ListDigraph::NodeMap<int> shapes(g);
1.23    ListDigraph::ArcMap<int> acolors(g);
1.24    ListDigraph::ArcMap<int> widths(g);
1.25 -
1.26 +
1.27    coords[n1]=Point(50,50);  sizes[n1]=1; colors[n1]=1; shapes[n1]=0;
1.28    coords[n2]=Point(50,70);  sizes[n2]=2; colors[n2]=2; shapes[n2]=2;
1.29    coords[n3]=Point(70,70);  sizes[n3]=1; colors[n3]=3; shapes[n3]=0;
1.30    coords[n4]=Point(70,50);  sizes[n4]=2; colors[n4]=4; shapes[n4]=1;
1.31    coords[n5]=Point(85,60);  sizes[n5]=3; colors[n5]=5; shapes[n5]=2;
1.32 -
1.33 +
1.34    Arc a;
1.37 @@ -78,7 +78,7 @@
1.41 -
1.42 +
1.43    IdMap<ListDigraph,Node> id(g);
1.45    // Create five .eps files showing the digraph with different options
1.46 @@ -182,14 +182,14 @@
1.47    ListDigraph h;
1.48    ListDigraph::NodeMap<int> hcolors(h);
1.49    ListDigraph::NodeMap<Point> hcoords(h);
1.50 -
1.51 +
1.52    int cols=int(sqrt(double(palette.size())));
1.53    for(int i=0;i<int(paletteW.size());i++) {
1.55      hcoords[n]=Point(1+i%cols,1+i/cols);
1.56      hcolors[n]=i;
1.57    }
1.58 -
1.59 +
1.60    cout << "Create 'graph_to_eps_demo_out_6_colors.eps'" << endl;
1.61    graphToEps(h,"graph_to_eps_demo_out_6_colors.eps").
1.62      scale(60).
1.63 @@ -202,6 +202,6 @@
1.64      nodeTexts(hcolors).nodeTextSize(.6).
1.65      nodeColors(composeMap(paletteW,hcolors)).
1.66      run();
1.67 -
1.68 +
1.69    return 0;
1.70  }