COIN-OR::LEMON - Graph Library

Changeset 2306:42cce226b87b in lemon-0.x for demo/topology_demo.cc


Ignore:
Timestamp:
11/21/06 19:22:08 (13 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3081
Message:

BfsVisitor?
Bipartite partitions based on visitors

topology_demo.cc => scaleToA4 works without extra parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/topology_demo.cc

    r2242 r2306  
    3737
    3838using namespace lemon;
     39using namespace lemon::dim2;
    3940using namespace std;
    4041
     
    5051
    5152  Graph graph;
    52   Graph::NodeMap<dim2::Point<double> > coords(graph);
     53  Graph::NodeMap<Point<double> > coords(graph);
    5354
    5455  UGraphReader<Graph>("u_components.lgf", graph).
     
    6465  graphToEps(graph, "connected_components.eps").undirected().
    6566    coords(coords).scaleToA4().enableParallel().
    66     parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    6767    nodeColors(composeMap(palette, compMap)).run();
    6868
     
    7575
    7676  Graph graph;
    77   Graph::NodeMap<dim2::Point<double> > coords(graph);
     77  Graph::NodeMap<Point<double> > coords(graph);
    7878
    7979  GraphReader<Graph>("dir_components.lgf", graph).
     
    9090
    9191  graphToEps(graph, "strongly_connected_components.eps").
    92     coords(coords).scaleToA4().enableParallel().
    93     drawArrows().arrowWidth(10.0).arrowLength(10.0).
    94     parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
     92    coords(coords).scaleToA4().enableParallel().drawArrows().
    9593    nodeColors(composeMap(palette, compMap)).
    9694    edgeColors(composeMap(functorMap(&color), cutMap)).run();
     
    105103
    106104  Graph graph;
    107   Graph::NodeMap<dim2::Point<double> > coords(graph);
     105  Graph::NodeMap<Point<double> > coords(graph);
    108106
    109107  UGraphReader<Graph>("u_components.lgf", graph).
     
    121119  graphToEps(graph, "bi_node_connected_components.eps").undirected().
    122120    coords(coords).scaleToA4().enableParallel().
    123     parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
    124121    edgeColors(composeMap(palette, compMap)).
    125122    nodeColors(composeMap(functorMap(&color), cutMap)).
     
    135132
    136133  Graph graph;
    137   Graph::NodeMap<dim2::Point<double> > coords(graph);
     134  Graph::NodeMap<Point<double> > coords(graph);
    138135
    139136  UGraphReader<Graph>("u_components.lgf", graph).
     
    151148  graphToEps(graph, "bi_edge_connected_components.eps").undirected().
    152149    coords(coords).scaleToA4().enableParallel().
    153     parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    154150    nodeColors(composeMap(palette, compMap)).
    155151    edgeColors(composeMap(functorMap(&color), cutMap)).run();
     
    164160
    165161  Graph graph;
    166   Graph::NodeMap<dim2::Point<double> > coords(graph);
     162  Graph::NodeMap<Point<double> > coords(graph);
    167163
    168164  UGraphReader<Graph>("partitions.lgf", graph).
     
    178174  graphToEps(graph, "bipartite_partitions.eps").undirected().
    179175    coords(coords).scaleToA4().enableParallel().
    180     parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    181176    nodeColors(composeMap(functorMap(&color), partMap)).run();
    182177 
Note: See TracChangeset for help on using the changeset viewer.