COIN-OR::LEMON - Graph Library

Changeset 201:b9158a014fe8 in lemon-0.x for src/work


Ignore:
Timestamp:
03/18/04 17:50:07 (21 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@279
Message:

Alpár javaslatára készítettem egy struktúrát 2 dimenziós vektorok (síkvektorok) tárolására. Olyasmiket tud, amiket síkvektoroktól szeretnénk. A neve: xy, a hasonló nevu .h file-ban található.

Location:
src/work/athos
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/makefile

    r36 r201  
    22CXX = g++-3.0
    33
    4 pf_demo: pf_demo.cc ../marci_graph_traits.hh ../marci_list_graph.hh ../marci_property_vector.hh preflow_push.hh ../reverse_bfs.hh
     4pf_demo: pf_demo.cc ../marci_graph_traits.hh ../list_graph.hh ../marci_property_vector.hh preflow_push.hh reverse_bfs.hh
    55        $(CXX) $(CXXFLAGS) -I. -I.. pf_demo.cc -o pf_demo
    66
  • src/work/athos/pf_demo.cc

    r105 r201  
    2424  typedef ListGraph::SymEdgeIt SymEdgeIt;
    2525  */
    26  
     26  ListGraph flowG;
     27
     28  /*
    2729  //Marci példája
    28   ListGraph flowG;
     30
    2931
    3032  NodeIt s=flowG.addNode();
     
    5961  cap.set(v3_t, 20);
    6062  cap.set(v4_t, 4);
     63  */
    6164
    6265
     66  //Ahuja könyv példája
    6367
     68  NodeIt s=flowG.addNode();
     69  NodeIt v2=flowG.addNode();
     70  NodeIt v3=flowG.addNode();
     71  NodeIt v4=flowG.addNode();
     72  NodeIt v5=flowG.addNode();
     73  NodeIt t=flowG.addNode();
    6474
    65 
    66 
    67 
    68   /*
    69   //Ahuja könyv példája
    70   node_iterator s=flow_test.add_node();
    71   NodeIt v2=flow_test.add_node();
    72   NodeIt v3=flow_test.add_node();
    73   NodeIt v4=flow_test.add_node();
    74   NodeIt v5=flow_test.add_node();
    75   NodeIt t=flow_test.add_node();
    76  
    77   node_property_vector<list_graph, std::string> node_name(flow_test);
    78   node_name.put(s, "s"); 
    79   node_name.put(v2, "v2");
    80   node_name.put(v3, "v3");
    81   node_name.put(v4, "v4");
    82   node_name.put(v5, "v5");
    83   node_name.put(t, "t");
    84 
    85  
    86   edge_iterator s_v2=flow_test.add_edge(s, v2);
    87   edge_iterator s_v3=flow_test.add_edge(s, v3);
    88  
    89   edge_iterator v2_v4=flow_test.add_edge(v2, v4);
    90   edge_iterator v2_v5=flow_test.add_edge(v2, v5);
    91 
    92   edge_iterator v3_v5=flow_test.add_edge(v3, v5);
    93 
    94   edge_iterator v4_t=flow_test.add_edge(v4, t);
    95   edge_iterator v5_t=flow_test.add_edge(v5, t);
     75  EdgeIt s_v2=flowG.addEdge(s, v2);
     76  EdgeIt s_v3=flowG.addEdge(s, v3);
     77  EdgeIt v2_v4=flowG.addEdge(v2, v4);
     78  EdgeIt v2_v5=flowG.addEdge(v2, v5);
     79  EdgeIt v3_v5=flowG.addEdge(v3, v5);
     80  EdgeIt v4_t=flowG.addEdge(v4, t);
     81  EdgeIt v5_t=flowG.addEdge(v5, t);
    9682 
    9783  //Kis modositas
    98   edge_iterator v2_s=flow_test.add_edge(v2, s);
     84  //edge_iterator v2_s=flowG.add_edge(v2, s);
    9985
    100   edge_property_vector<list_graph, int> cap(flow_test); 
    101   cap.put(s_v2, 10);
    102   cap.put(s_v3, 10);
    103   cap.put(v2_v4, 5);
    104   cap.put(v2_v5, 8);
    105   cap.put(v3_v5, 5);
    106   cap.put(v4_t, 8);
    107   cap.put(v5_t, 8);
     86  ListGraph::EdgeMap<int> cap(flowG);
     87
     88  cap.set(s_v2, 10);
     89  cap.set(s_v3, 10);
     90  cap.set(v2_v4, 5);
     91  cap.set(v2_v5, 8);
     92  cap.set(v3_v5, 5);
     93  cap.set(v4_t, 8);
     94  cap.set(v5_t, 8);
    10895
    10996  //Kis modositas
    110   cap.put(v2_s, 100);
    111 
    112   //Kis modositas
    113   //edge_iterator t_s=flow_test.add_edge(t, s);
    114   //cap.put(t_s, 20);
    115 
    116   */
     97  //cap.put(v2_s, 100);
     98 
    11799
    118100
Note: See TracChangeset for help on using the changeset viewer.