Changeset 2306:42cce226b87b in lemon-0.x for demo
- Timestamp:
- 11/21/06 19:22:08 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3081
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/topology_demo.cc
r2242 r2306 37 37 38 38 using namespace lemon; 39 using namespace lemon::dim2; 39 40 using namespace std; 40 41 … … 50 51 51 52 Graph graph; 52 Graph::NodeMap< dim2::Point<double> > coords(graph);53 Graph::NodeMap<Point<double> > coords(graph); 53 54 54 55 UGraphReader<Graph>("u_components.lgf", graph). … … 64 65 graphToEps(graph, "connected_components.eps").undirected(). 65 66 coords(coords).scaleToA4().enableParallel(). 66 parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).67 67 nodeColors(composeMap(palette, compMap)).run(); 68 68 … … 75 75 76 76 Graph graph; 77 Graph::NodeMap< dim2::Point<double> > coords(graph);77 Graph::NodeMap<Point<double> > coords(graph); 78 78 79 79 GraphReader<Graph>("dir_components.lgf", graph). … … 90 90 91 91 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(). 95 93 nodeColors(composeMap(palette, compMap)). 96 94 edgeColors(composeMap(functorMap(&color), cutMap)).run(); … … 105 103 106 104 Graph graph; 107 Graph::NodeMap< dim2::Point<double> > coords(graph);105 Graph::NodeMap<Point<double> > coords(graph); 108 106 109 107 UGraphReader<Graph>("u_components.lgf", graph). … … 121 119 graphToEps(graph, "bi_node_connected_components.eps").undirected(). 122 120 coords(coords).scaleToA4().enableParallel(). 123 parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).124 121 edgeColors(composeMap(palette, compMap)). 125 122 nodeColors(composeMap(functorMap(&color), cutMap)). … … 135 132 136 133 Graph graph; 137 Graph::NodeMap< dim2::Point<double> > coords(graph);134 Graph::NodeMap<Point<double> > coords(graph); 138 135 139 136 UGraphReader<Graph>("u_components.lgf", graph). … … 151 148 graphToEps(graph, "bi_edge_connected_components.eps").undirected(). 152 149 coords(coords).scaleToA4().enableParallel(). 153 parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).154 150 nodeColors(composeMap(palette, compMap)). 155 151 edgeColors(composeMap(functorMap(&color), cutMap)).run(); … … 164 160 165 161 Graph graph; 166 Graph::NodeMap< dim2::Point<double> > coords(graph);162 Graph::NodeMap<Point<double> > coords(graph); 167 163 168 164 UGraphReader<Graph>("partitions.lgf", graph). … … 178 174 graphToEps(graph, "bipartite_partitions.eps").undirected(). 179 175 coords(coords).scaleToA4().enableParallel(). 180 parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).181 176 nodeColors(composeMap(functorMap(&color), partMap)).run(); 182 177
Note: See TracChangeset
for help on using the changeset viewer.