COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
02/08/08 12:04:37 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3452
Message:

Hopefully fix all compilation errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/bipartite_matching_test.cc

    r2553 r2571  
    3939BPUGRAPH_TYPEDEFS(Graph);
    4040
    41 const int N = 10;
    42 const int M = 10;
    43 const int E = 52;
    44 const int C = 100;
    45 
    46 const int sa[E] = { 6, 5, 6, 4, 1, 0, 9, 5, 2, 4, 4, 3, 5,
     41const int NN = 10;
     42const int MM = 10;
     43const int EE = 52;
     44const int CC = 100;
     45
     46const int sa[EE] = { 6, 5, 6, 4, 1, 0, 9, 5, 2, 4, 4, 3, 5,
    4747                    2, 3, 8, 3, 4, 9, 6, 9, 4, 3, 1, 5, 8,
    4848                    4, 8, 9, 2, 2, 3, 0, 5, 2, 3, 6, 3, 8,
    4949                    8, 4, 0, 9, 9, 6, 2, 1, 2, 7, 1, 9, 4};
    5050
    51 const int ta[E] = { 2, 7, 4, 8, 6, 3, 4, 1, 7, 7, 0, 1, 6,
     51const int ta[EE] = { 2, 7, 4, 8, 6, 3, 4, 1, 7, 7, 0, 1, 6,
    5252                    3, 2, 6, 8, 3, 5, 6, 3, 1, 8, 7, 2, 0,
    5353                    6, 9, 6, 7, 8, 3, 3, 4, 5, 8, 6, 4, 1,
    5454                    4, 3, 3, 8, 7, 7, 3, 7, 7, 3, 5, 1, 6};
    5555
    56 const int wa[E] = { 3, 99, 85, 16, 79, 52, 83, 99, 62, 6, 42, 6, 95,
     56const int wa[EE] = { 3, 99, 85, 16, 79, 52, 83, 99, 62, 6, 42, 6, 95,
    5757                    13, 34, 9, 5, 38, 39, 75, 99, 12, 73, 35, 93, 43,
    5858                    54, 91, 45, 26, 77, 47, 11, 22, 50, 74, 37, 64, 91,
     
    7272  int min_cost_matching;
    7373
    74   for (int i = 0; i < N; ++i) {
     74  for (int i = 0; i < NN; ++i) {
    7575    Node node = graph.addANode();
    7676    aNodes.push_back(node);
    7777  }
    78   for (int i = 0; i < M; ++i) {
     78  for (int i = 0; i < MM; ++i) {
    7979    Node node = graph.addBNode();
    8080    bNodes.push_back(node);
    8181  }
    82   for (int i = 0; i < E; ++i) {
     82  for (int i = 0; i < EE; ++i) {
    8383    Node aNode = aNodes[sa[i]];
    8484    Node bNode = bNodes[ta[i]];
     
    349349
    350350  Graph::UEdgeMap<int> cost(graph);
    351   cost = subMap(constMap<UEdge>(C), weight);
     351  cost = subMap(constMap<UEdge>(CC), weight);
    352352  {
    353353
     
    364364    min_cost_matching = bpmatch.matchingCost();
    365365    check(max_cardinality == bpmatch.matchingSize(), "WRONG SIZE");
    366     check(max_cardinality * C - max_cardinality_max_weight
     366    check(max_cardinality * CC - max_cardinality_max_weight
    367367          == bpmatch.matchingCost(), "WRONG SIZE");
    368368
     
    387387    min_cost_matching = bpmatch.matchingCost();
    388388    check(max_cardinality == bpmatch.matchingSize(), "WRONG SIZE");
    389     check(max_cardinality * C - max_cardinality_max_weight
     389    check(max_cardinality * CC - max_cardinality_max_weight
    390390          == bpmatch.matchingCost(), "WRONG SIZE");
    391391
Note: See TracChangeset for help on using the changeset viewer.