demo/topology_demo.cc
changeset 2306 42cce226b87b
parent 2242 16523135943d
child 2391 14a343be7a5a
     1.1 --- a/demo/topology_demo.cc	Tue Nov 21 17:28:08 2006 +0000
     1.2 +++ b/demo/topology_demo.cc	Tue Nov 21 18:22:08 2006 +0000
     1.3 @@ -36,6 +36,7 @@
     1.4  /// \include topology_demo.cc
     1.5  
     1.6  using namespace lemon;
     1.7 +using namespace lemon::dim2;
     1.8  using namespace std;
     1.9  
    1.10  
    1.11 @@ -49,7 +50,7 @@
    1.12    typedef Graph::Node Node;
    1.13  
    1.14    Graph graph;
    1.15 -  Graph::NodeMap<dim2::Point<double> > coords(graph);
    1.16 +  Graph::NodeMap<Point<double> > coords(graph);
    1.17  
    1.18    UGraphReader<Graph>("u_components.lgf", graph).
    1.19      readNodeMap("coordinates_x", xMap(coords)).
    1.20 @@ -63,7 +64,6 @@
    1.21  
    1.22    graphToEps(graph, "connected_components.eps").undirected().
    1.23      coords(coords).scaleToA4().enableParallel().
    1.24 -    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.25      nodeColors(composeMap(palette, compMap)).run();
    1.26  
    1.27    std::cout << "Result: connected_components.eps" << std::endl;
    1.28 @@ -74,7 +74,7 @@
    1.29    typedef Graph::Node Node;
    1.30  
    1.31    Graph graph;
    1.32 -  Graph::NodeMap<dim2::Point<double> > coords(graph);
    1.33 +  Graph::NodeMap<Point<double> > coords(graph);
    1.34  
    1.35    GraphReader<Graph>("dir_components.lgf", graph).
    1.36      readNodeMap("coordinates_x", xMap(coords)).
    1.37 @@ -89,9 +89,7 @@
    1.38    stronglyConnectedCutEdges(graph, cutMap);
    1.39  
    1.40    graphToEps(graph, "strongly_connected_components.eps").
    1.41 -    coords(coords).scaleToA4().enableParallel().
    1.42 -    drawArrows().arrowWidth(10.0).arrowLength(10.0).
    1.43 -    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.44 +    coords(coords).scaleToA4().enableParallel().drawArrows().
    1.45      nodeColors(composeMap(palette, compMap)).
    1.46      edgeColors(composeMap(functorMap(&color), cutMap)).run();
    1.47  
    1.48 @@ -104,7 +102,7 @@
    1.49    typedef Graph::UEdge UEdge;
    1.50  
    1.51    Graph graph;
    1.52 -  Graph::NodeMap<dim2::Point<double> > coords(graph);
    1.53 +  Graph::NodeMap<Point<double> > coords(graph);
    1.54  
    1.55    UGraphReader<Graph>("u_components.lgf", graph).
    1.56      readNodeMap("coordinates_x", xMap(coords)).
    1.57 @@ -120,7 +118,6 @@
    1.58  
    1.59    graphToEps(graph, "bi_node_connected_components.eps").undirected().
    1.60      coords(coords).scaleToA4().enableParallel().
    1.61 -    parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
    1.62      edgeColors(composeMap(palette, compMap)).
    1.63      nodeColors(composeMap(functorMap(&color), cutMap)).
    1.64      run();
    1.65 @@ -134,7 +131,7 @@
    1.66    typedef Graph::UEdge UEdge;
    1.67  
    1.68    Graph graph;
    1.69 -  Graph::NodeMap<dim2::Point<double> > coords(graph);
    1.70 +  Graph::NodeMap<Point<double> > coords(graph);
    1.71  
    1.72    UGraphReader<Graph>("u_components.lgf", graph).
    1.73      readNodeMap("coordinates_x", xMap(coords)).
    1.74 @@ -150,7 +147,6 @@
    1.75  
    1.76    graphToEps(graph, "bi_edge_connected_components.eps").undirected().
    1.77      coords(coords).scaleToA4().enableParallel().
    1.78 -    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.79      nodeColors(composeMap(palette, compMap)).
    1.80      edgeColors(composeMap(functorMap(&color), cutMap)).run();
    1.81    
    1.82 @@ -163,7 +159,7 @@
    1.83    typedef Graph::UEdge UEdge;
    1.84  
    1.85    Graph graph;
    1.86 -  Graph::NodeMap<dim2::Point<double> > coords(graph);
    1.87 +  Graph::NodeMap<Point<double> > coords(graph);
    1.88  
    1.89    UGraphReader<Graph>("partitions.lgf", graph).
    1.90      readNodeMap("coordinates_x", xMap(coords)).
    1.91 @@ -177,7 +173,6 @@
    1.92  
    1.93    graphToEps(graph, "bipartite_partitions.eps").undirected().
    1.94      coords(coords).scaleToA4().enableParallel().
    1.95 -    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.96      nodeColors(composeMap(functorMap(&color), partMap)).run();
    1.97    
    1.98    std::cout << "Result: bipartite_partitions.eps" << std::endl;