COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
07/13/08 20:51:02 (11 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Apply unify-sources.sh to the source tree

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.
    44 *
    55 * Copyright (C) 2003-2008
     
    5050  typedef ListDigraph::Arc Arc;
    5151  typedef dim2::Point<int> Point;
    52  
     52
    5353  Node n1=g.addNode();
    5454  Node n2=g.addNode();
     
    6363  ListDigraph::ArcMap<int> acolors(g);
    6464  ListDigraph::ArcMap<int> widths(g);
    65  
     65
    6666  coords[n1]=Point(50,50);  sizes[n1]=1; colors[n1]=1; shapes[n1]=0;
    6767  coords[n2]=Point(50,70);  sizes[n2]=2; colors[n2]=2; shapes[n2]=2;
     
    6969  coords[n4]=Point(70,50);  sizes[n4]=2; colors[n4]=4; shapes[n4]=1;
    7070  coords[n5]=Point(85,60);  sizes[n5]=3; colors[n5]=5; shapes[n5]=2;
    71  
     71
    7272  Arc a;
    7373
     
    7979  a=g.addArc(n2,n4); acolors[a]=1; widths[a]=2;
    8080  a=g.addArc(n3,n4); acolors[a]=2; widths[a]=1;
    81  
     81
    8282  IdMap<ListDigraph,Node> id(g);
    8383
     
    183183  ListDigraph::NodeMap<int> hcolors(h);
    184184  ListDigraph::NodeMap<Point> hcoords(h);
    185  
     185
    186186  int cols=int(sqrt(double(palette.size())));
    187187  for(int i=0;i<int(paletteW.size());i++) {
     
    190190    hcolors[n]=i;
    191191  }
    192  
     192
    193193  cout << "Create 'graph_to_eps_demo_out_6_colors.eps'" << endl;
    194194  graphToEps(h,"graph_to_eps_demo_out_6_colors.eps").
     
    203203    nodeColors(composeMap(paletteW,hcolors)).
    204204    run();
    205    
     205
    206206  return 0;
    207207}
Note: See TracChangeset for help on using the changeset viewer.