COIN-OR::LEMON - Graph Library

Changeset 1557:3e8d928e283d in lemon-0.x for test


Ignore:
Timestamp:
07/14/05 14:23:15 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2053
Message:

Each version of Kruskal is called the same ( kruskal(g,in,out) ) independently
from the input source and the output type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/kruskal_test.cc

    r1435 r1557  
    3333  concept::WriteMap<concept::StaticGraph::Edge,bool> w;
    3434
    35   kruskalEdgeMap(concept::StaticGraph(),
    36                 concept::ReadMap<concept::StaticGraph::Edge,int>(),
    37                 w);
     35  kruskal(concept::StaticGraph(),
     36          concept::ReadMap<concept::StaticGraph::Edge,int>(),
     37          w);
    3838}
    3939
     
    7373
    7474  //Test with const map.
    75   check(kruskalEdgeMap(G, ConstMap<ListGraph::Edge,int>(2), tree_map)==10,
     75  check(kruskal(G, ConstMap<ListGraph::Edge,int>(2), tree_map)==10,
    7676        "Total cost should be 10");
    7777  //Test with a edge map (filled with uniform costs).
    78   check(kruskalEdgeMap(G, edge_cost_map, tree_map)==10,
     78  check(kruskal(G, edge_cost_map, tree_map)==10,
    7979        "Total cost should be 10");
    8080
     
    9090  edge_cost_map.set(e10, -1);
    9191
    92   vector<Edge> tree_edge_vec;
     92  vector<Edge> tree_edge_vec(5);
    9393
    9494  //Test with a edge map and inserter.
    95   check(kruskalEdgeMap_IteratorOut(G, edge_cost_map,
    96                                    back_inserter(tree_edge_vec))
     95  check(kruskal(G, edge_cost_map,
     96                 tree_edge_vec.begin())
    9797        ==-31,
    9898        "Total cost should be -31.");
    99 
     99 
    100100  tree_edge_vec.clear();
    101101
     102  check(kruskal(G, edge_cost_map,
     103                back_inserter(tree_edge_vec))
     104        ==-31,
     105        "Total cost should be -31.");
     106 
     107  tree_edge_vec.clear();
     108 
    102109  //The above test could also be coded like this:
    103110  check(kruskal(G,
Note: See TracChangeset for help on using the changeset viewer.