src/work/athos/min_cost_flow.cc
changeset 672 6c7bd0edd1d7
parent 662 0155001b6f65
child 921 818510fa3d99
     1.1 --- a/src/work/athos/min_cost_flow.cc	Tue Jun 01 11:00:24 2004 +0000
     1.2 +++ b/src/work/athos/min_cost_flow.cc	Wed Jun 02 09:45:50 2004 +0000
     1.3 @@ -11,7 +11,7 @@
     1.4  
     1.5  
     1.6  bool passed = true;
     1.7 -/*
     1.8 +
     1.9  void check(bool rc, char *msg="") {
    1.10    passed = passed && rc;
    1.11    if(!rc) {
    1.12 @@ -20,7 +20,7 @@
    1.13  
    1.14    }
    1.15  }
    1.16 -*/
    1.17 +
    1.18  
    1.19  
    1.20  int main()
    1.21 @@ -90,6 +90,7 @@
    1.22  
    1.23    min_cost_flow_test.run();
    1.24    //int k=1;
    1.25 +  check(min_cost_flow_test.checkOptimality(), "Is the primal-dual solution pair really optimal?");
    1.26  
    1.27    /*
    1.28    check(  min_cost_flow_test.run(s,t,k) == 1 && min_cost_flow_test.totalLength() == 19,"One path, total cost should be 19");
    1.29 @@ -109,10 +110,10 @@
    1.30  
    1.31    check(min_cost_flow_test.checkComplementarySlackness(), "Is the primal-dual solution pair really optimal?");
    1.32  
    1.33 -
    1.34 +  */
    1.35    cout << (passed ? "All tests passed." : "Some of the tests failed!!!")
    1.36         << endl;
    1.37  
    1.38    return passed ? 0 : 1;
    1.39 -  */
    1.40 +  
    1.41  }