COIN-OR::LEMON - Graph Library

Changeset 2207:75a29ac69c19 in lemon-0.x for demo/graph_to_eps_demo.cc


Ignore:
Timestamp:
09/07/06 15:27:16 (13 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2933
Message:

xy -> dim2::Point

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/graph_to_eps_demo.cc

    r2178 r2207  
    4949  typedef ListGraph::NodeIt NodeIt;
    5050  typedef ListGraph::Edge Edge;
    51   typedef xy<int> Xy;
     51  typedef dim2::Point<int> Point;
    5252 
    5353  Node n1=g.addNode();
     
    5757  Node n5=g.addNode();
    5858
    59   ListGraph::NodeMap<Xy> coords(g);
     59  ListGraph::NodeMap<Point> coords(g);
    6060  ListGraph::NodeMap<double> sizes(g);
    6161  ListGraph::NodeMap<int> colors(g);
     
    6464  ListGraph::EdgeMap<int> widths(g);
    6565 
    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;
    7171 
    7272  Edge e;
     
    184184  ListGraph h;
    185185  ListGraph::NodeMap<int> hcolors(h);
    186   ListGraph::NodeMap<Xy> hcoords(h);
     186  ListGraph::NodeMap<Point> hcoords(h);
    187187 
    188188  int cols=int(sqrt(double(palette.size())));
    189189  for(int i=0;i<int(paletteW.size());i++) {
    190190    Node n=h.addNode();
    191     hcoords[n]=Xy(i%cols,i/cols);
     191    hcoords[n]=Point(i%cols,i/cols);
    192192    hcolors[n]=i;
    193193  }
Note: See TracChangeset for help on using the changeset viewer.