COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x for demo


Ignore:
Timestamp:
01/26/06 16:42:13 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
Message:

Undir -> U transition

Location:
demo
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • demo/coloring.cc

    r1875 r1909  
    4141int main() {
    4242
    43   typedef UndirSmartGraph Graph;
     43  typedef SmartUGraph Graph;
    4444  typedef Graph::Node Node;
    4545  typedef Graph::NodeIt NodeIt;
    46   typedef Graph::UndirEdge UndirEdge;
     46  typedef Graph::UEdge UEdge;
    4747  typedef Graph::IncEdgeIt IncEdgeIt;
    4848
     
    5353  Graph graph;
    5454
    55   UndirGraphReader<Graph> reader("coloring.lgf", graph);
     55  UGraphReader<Graph> reader("coloring.lgf", graph);
    5656  Graph::NodeMap<xy<double> > coords(graph);
    5757  reader.readNodeMap("coords", coords);
  • demo/coloring.lgf

    r1901 r1909  
    1212(157, -150)     1       
    1313(-282, -149)    0       
    14 @undiredgeset
     14@uedgeset
    1515                label   
    16169       10      17     
  • demo/partitions.lgf

    r1901 r1909  
    2424-607.82         -246.651        2       
    2525-274            -131            1       
    26 @undiredgeset
     26@uedgeset
    2727                label   
    282812      23      15     
  • demo/topology_demo.cc

    r1875 r1909  
    4444
    4545void drawConnectedComponents() {
    46   typedef UndirListGraph Graph;
     46  typedef ListUGraph Graph;
    4747  typedef Graph::Node Node;
    4848
     
    5050  Graph::NodeMap<xy<double> > coords(graph);
    5151
    52   UndirGraphReader<Graph>("undir_components.lgf", graph).
     52  UGraphReader<Graph>("u_components.lgf", graph).
    5353    readNodeMap("coordinates_x", xMap(coords)).
    5454    readNodeMap("coordinates_y", yMap(coords)).
     
    6060  connectedComponents(graph, compMap);
    6161
    62   graphToEps(graph, "connected_components.eps").undir().
     62  graphToEps(graph, "connected_components.eps").u().
    6363    coords(coords).scaleToA4().enableParallel().
    6464    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
     
    9898
    9999void drawNodeBiconnectedComponents() {
    100   typedef UndirListGraph Graph;
     100  typedef ListUGraph Graph;
    101101  typedef Graph::Node Node;
    102   typedef Graph::UndirEdge UndirEdge;
     102  typedef Graph::UEdge UEdge;
    103103
    104104  Graph graph;
    105105  Graph::NodeMap<xy<double> > coords(graph);
    106106
    107   UndirGraphReader<Graph>("undir_components.lgf", graph).
     107  UGraphReader<Graph>("u_components.lgf", graph).
    108108    readNodeMap("coordinates_x", xMap(coords)).
    109109    readNodeMap("coordinates_y", yMap(coords)).
     
    112112  ColorSet colorSet;
    113113
    114   Graph::UndirEdgeMap<int> compMap(graph);
     114  Graph::UEdgeMap<int> compMap(graph);
    115115  Graph::NodeMap<bool> cutMap(graph);
    116116  biNodeConnectedComponents(graph, compMap);
    117117  biNodeConnectedCutNodes(graph, cutMap);
    118   graphToEps(graph, "bi_node_connected_components.eps").undir().
     118  graphToEps(graph, "bi_node_connected_components.eps").u().
    119119    coords(coords).scaleToA4().enableParallel().
    120120    parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
     
    127127
    128128void drawEdgeBiconnectedComponents() {
    129   typedef UndirListGraph Graph;
     129  typedef ListUGraph Graph;
    130130  typedef Graph::Node Node;
    131   typedef Graph::UndirEdge UndirEdge;
     131  typedef Graph::UEdge UEdge;
    132132
    133133  Graph graph;
    134134  Graph::NodeMap<xy<double> > coords(graph);
    135135
    136   UndirGraphReader<Graph>("undir_components.lgf", graph).
     136  UGraphReader<Graph>("u_components.lgf", graph).
    137137    readNodeMap("coordinates_x", xMap(coords)).
    138138    readNodeMap("coordinates_y", yMap(coords)).
     
    142142
    143143  Graph::NodeMap<int> compMap(graph);
    144   Graph::UndirEdgeMap<bool> cutMap(graph);
     144  Graph::UEdgeMap<bool> cutMap(graph);
    145145  biEdgeConnectedComponents(graph, compMap);
    146146  biEdgeConnectedCutEdges(graph, cutMap);
    147147
    148   graphToEps(graph, "bi_edge_connected_components.eps").undir().
     148  graphToEps(graph, "bi_edge_connected_components.eps").u().
    149149    coords(coords).scaleToA4().enableParallel().
    150150    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
     
    156156
    157157void drawBipartitePartitions() {
    158   typedef UndirListGraph Graph;
     158  typedef ListUGraph Graph;
    159159  typedef Graph::Node Node;
    160   typedef Graph::UndirEdge UndirEdge;
     160  typedef Graph::UEdge UEdge;
    161161
    162162  Graph graph;
    163163  Graph::NodeMap<xy<double> > coords(graph);
    164164
    165   UndirGraphReader<Graph>("partitions.lgf", graph).
     165  UGraphReader<Graph>("partitions.lgf", graph).
    166166    readNodeMap("coordinates_x", xMap(coords)).
    167167    readNodeMap("coordinates_y", yMap(coords)).
     
    173173  bipartitePartitions(graph, partMap);
    174174
    175   graphToEps(graph, "bipartite_partitions.eps").undir().
     175  graphToEps(graph, "bipartite_partitions.eps").u().
    176176    coords(coords).scaleToA4().enableParallel().
    177177    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
  • demo/undir_components.lgf

    r1901 r1909  
    4444-689.204        -237.261        32     
    4545-567.302        43.6423 33     
    46 @undiredgeset
     46@uedgeset
    4747                label   
    484841      42      44     
Note: See TracChangeset for help on using the changeset viewer.