lemon/matching.h
changeset 877 141f9c0db4a3
parent 876 7f6e2bd76654
     1.1 --- a/lemon/matching.h	Wed Mar 17 12:35:52 2010 +0100
     1.2 +++ b/lemon/matching.h	Sat Mar 06 14:35:12 2010 +0000
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2010
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -1623,7 +1623,7 @@
    1.13          (*_delta2_index)[i] = _delta2->PRE_HEAP;
    1.14          (*_delta4_index)[i] = _delta4->PRE_HEAP;
    1.15        }
    1.16 -      
    1.17 +
    1.18        _unmatched = _node_num;
    1.19  
    1.20        _delta1->clear();
    1.21 @@ -1678,7 +1678,7 @@
    1.22  
    1.23        _blossom_node_list.clear();
    1.24        _blossom_potential.clear();
    1.25 -      
    1.26 +
    1.27        if (_fractional == 0) {
    1.28          _fractional = new FractionalMatching(_graph, _weight, false);
    1.29        }
    1.30 @@ -1750,17 +1750,17 @@
    1.31            while (n != v) {
    1.32              subblossoms[--num] = _blossom_set->find(v);
    1.33              _delta1->push(v, _fractional->nodeValue(v));
    1.34 -            v = _graph.target(_fractional->matching(v));            
    1.35 +            v = _graph.target(_fractional->matching(v));
    1.36            }
    1.37 -          
    1.38 -          int surface = 
    1.39 +
    1.40 +          int surface =
    1.41              _blossom_set->join(subblossoms.begin(), subblossoms.end());
    1.42            (*_blossom_data)[surface].status = EVEN;
    1.43            (*_blossom_data)[surface].pred = INVALID;
    1.44            (*_blossom_data)[surface].next = INVALID;
    1.45            (*_blossom_data)[surface].pot = 0;
    1.46            (*_blossom_data)[surface].offset = 0;
    1.47 -          
    1.48 +
    1.49            _tree_set->insert(surface);
    1.50            ++_unmatched;
    1.51          }
    1.52 @@ -1810,7 +1810,7 @@
    1.53              }
    1.54            }
    1.55          }
    1.56 -            
    1.57 +
    1.58          if (!(*_node_data)[ni].heap.empty()) {
    1.59            _blossom_set->decrease(n, (*_node_data)[ni].heap.prio());
    1.60            _delta2->push(nb, _blossom_set->classPrio(nb));
    1.61 @@ -2269,7 +2269,7 @@
    1.62      Value _delta_sum;
    1.63      int _unmatched;
    1.64  
    1.65 -    typedef MaxWeightedPerfectFractionalMatching<Graph, WeightMap> 
    1.66 +    typedef MaxWeightedPerfectFractionalMatching<Graph, WeightMap>
    1.67      FractionalMatching;
    1.68      FractionalMatching *_fractional;
    1.69  
    1.70 @@ -3095,7 +3095,7 @@
    1.71  
    1.72        _blossom_node_list.clear();
    1.73        _blossom_potential.clear();
    1.74 -      
    1.75 +
    1.76        if (_fractional == 0) {
    1.77          _fractional = new FractionalMatching(_graph, _weight, false);
    1.78        }
    1.79 @@ -3161,17 +3161,17 @@
    1.80            v = _graph.target(_fractional->matching(n));
    1.81            while (n != v) {
    1.82              subblossoms[--num] = _blossom_set->find(v);
    1.83 -            v = _graph.target(_fractional->matching(v));            
    1.84 +            v = _graph.target(_fractional->matching(v));
    1.85            }
    1.86 -          
    1.87 -          int surface = 
    1.88 +
    1.89 +          int surface =
    1.90              _blossom_set->join(subblossoms.begin(), subblossoms.end());
    1.91            (*_blossom_data)[surface].status = EVEN;
    1.92            (*_blossom_data)[surface].pred = INVALID;
    1.93            (*_blossom_data)[surface].next = INVALID;
    1.94            (*_blossom_data)[surface].pot = 0;
    1.95            (*_blossom_data)[surface].offset = 0;
    1.96 -          
    1.97 +
    1.98            _tree_set->insert(surface);
    1.99            ++_unmatched;
   1.100          }
   1.101 @@ -3221,7 +3221,7 @@
   1.102              }
   1.103            }
   1.104          }
   1.105 -            
   1.106 +
   1.107          if (!(*_node_data)[ni].heap.empty()) {
   1.108            _blossom_set->decrease(n, (*_node_data)[ni].heap.prio());
   1.109            _delta2->push(nb, _blossom_set->classPrio(nb));