COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/gomory_hu_test.cc

    r1081 r643  
    1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
    2  *
    3  * This file is a part of LEMON, a generic C++ optimization library.
    4  *
    5  * Copyright (C) 2003-2011
    6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
    8  *
    9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    11  * precise terms see the accompanying LICENSE file.
    12  *
    13  * This software is provided "AS IS" with no warranty of any kind,
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    16  *
    17  */
    18 
    191#include <iostream>
    202
     
    5234  "source 0\n"
    5335  "target 3\n";
    54 
     36 
    5537void checkGomoryHuCompile()
    5638{
     
    8870
    8971int cutValue(const Graph& graph, const BoolNodeMap& cut,
    90              const IntEdgeMap& capacity) {
     72             const IntEdgeMap& capacity) {
    9173
    9274  int sum = 0;
     
    126108      int sum=0;
    127109      for(GomoryHu<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a)
    128         sum+=capacity[a];
     110        sum+=capacity[a]; 
    129111      check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt");
    130112
     
    137119    }
    138120  }
    139 
     121 
    140122  return 0;
    141123}
Note: See TracChangeset for help on using the changeset viewer.