demo/topology_demo.cc
changeset 2172 4b25e7003868
parent 2116 b6a68c15a6a3
child 2174 f9e43b5cc617
     1.1 --- a/demo/topology_demo.cc	Thu Aug 10 10:11:07 2006 +0000
     1.2 +++ b/demo/topology_demo.cc	Thu Aug 10 10:18:04 2006 +0000
     1.3 @@ -56,7 +56,7 @@
     1.4      readNodeMap("coordinates_y", yMap(coords)).
     1.5      run();
     1.6    
     1.7 -  ColorSet colorSet;
     1.8 +  Palette palette;
     1.9  
    1.10    Graph::NodeMap<int> compMap(graph);
    1.11    connectedComponents(graph, compMap);
    1.12 @@ -64,7 +64,7 @@
    1.13    graphToEps(graph, "connected_components.eps").undirected().
    1.14      coords(coords).scaleToA4().enableParallel().
    1.15      parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.16 -    nodeColors(composeMap(colorSet, compMap)).run();
    1.17 +    nodeColors(composeMap(palette, compMap)).run();
    1.18  
    1.19    std::cout << "Result: connected_components.eps" << std::endl;
    1.20  }
    1.21 @@ -81,7 +81,7 @@
    1.22      readNodeMap("coordinates_y", yMap(coords)).
    1.23      run();
    1.24    
    1.25 -  ColorSet colorSet;
    1.26 +  Palette palette;
    1.27  
    1.28    Graph::NodeMap<int> compMap(graph);
    1.29    Graph::EdgeMap<bool> cutMap(graph);
    1.30 @@ -92,7 +92,7 @@
    1.31      coords(coords).scaleToA4().enableParallel().
    1.32      drawArrows().arrowWidth(10.0).arrowLength(10.0).
    1.33      parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.34 -    nodeColors(composeMap(colorSet, compMap)).
    1.35 +    nodeColors(composeMap(palette, compMap)).
    1.36      edgeColors(composeMap(functorMap(&color), cutMap)).run();
    1.37  
    1.38    std::cout << "Result: strongly_connected_components.eps" << std::endl;
    1.39 @@ -111,7 +111,7 @@
    1.40      readNodeMap("coordinates_y", yMap(coords)).
    1.41      run();
    1.42  
    1.43 -  ColorSet colorSet;
    1.44 +  Palette palette;
    1.45  
    1.46    Graph::UEdgeMap<int> compMap(graph);
    1.47    Graph::NodeMap<bool> cutMap(graph);
    1.48 @@ -121,7 +121,7 @@
    1.49    graphToEps(graph, "bi_node_connected_components.eps").undirected().
    1.50      coords(coords).scaleToA4().enableParallel().
    1.51      parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
    1.52 -    edgeColors(composeMap(colorSet, compMap)).
    1.53 +    edgeColors(composeMap(palette, compMap)).
    1.54      nodeColors(composeMap(functorMap(&color), cutMap)).
    1.55      run();
    1.56  
    1.57 @@ -141,7 +141,7 @@
    1.58      readNodeMap("coordinates_y", yMap(coords)).
    1.59      run();
    1.60    
    1.61 -  ColorSet colorSet;
    1.62 +  Palette palette;
    1.63  
    1.64    Graph::NodeMap<int> compMap(graph);
    1.65    Graph::UEdgeMap<bool> cutMap(graph);
    1.66 @@ -151,7 +151,7 @@
    1.67    graphToEps(graph, "bi_edge_connected_components.eps").undirected().
    1.68      coords(coords).scaleToA4().enableParallel().
    1.69      parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    1.70 -    nodeColors(composeMap(colorSet, compMap)).
    1.71 +    nodeColors(composeMap(palette, compMap)).
    1.72      edgeColors(composeMap(functorMap(&color), cutMap)).run();
    1.73    
    1.74    std::cout << "Result: bi_edge_connected_components.eps" << std::endl;
    1.75 @@ -170,7 +170,7 @@
    1.76      readNodeMap("coordinates_y", yMap(coords)).
    1.77      run();
    1.78    
    1.79 -  ColorSet colorSet;
    1.80 +  Palette palette;
    1.81  
    1.82    Graph::NodeMap<bool> partMap(graph);
    1.83    bipartitePartitions(graph, partMap);