COIN-OR::LEMON - Graph Library

Changeset 956:141f9c0db4a3 in lemon for lemon/matching.h


Ignore:
Timestamp:
03/06/10 15:35:12 (10 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
957:f802439d2b58, 959:38213abd2911, 1041:f112c18bc304
Phase:
public
Message:

Unify the sources (#339)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/matching.h

    r955 r956  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2010
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    16241624        (*_delta4_index)[i] = _delta4->PRE_HEAP;
    16251625      }
    1626      
     1626
    16271627      _unmatched = _node_num;
    16281628
     
    16791679      _blossom_node_list.clear();
    16801680      _blossom_potential.clear();
    1681      
     1681
    16821682      if (_fractional == 0) {
    16831683        _fractional = new FractionalMatching(_graph, _weight, false);
     
    17511751            subblossoms[--num] = _blossom_set->find(v);
    17521752            _delta1->push(v, _fractional->nodeValue(v));
    1753             v = _graph.target(_fractional->matching(v));           
     1753            v = _graph.target(_fractional->matching(v));
    17541754          }
    1755          
    1756           int surface = 
     1755
     1756          int surface =
    17571757            _blossom_set->join(subblossoms.begin(), subblossoms.end());
    17581758          (*_blossom_data)[surface].status = EVEN;
     
    17611761          (*_blossom_data)[surface].pot = 0;
    17621762          (*_blossom_data)[surface].offset = 0;
    1763          
     1763
    17641764          _tree_set->insert(surface);
    17651765          ++_unmatched;
     
    18111811          }
    18121812        }
    1813            
     1813
    18141814        if (!(*_node_data)[ni].heap.empty()) {
    18151815          _blossom_set->decrease(n, (*_node_data)[ni].heap.prio());
     
    22702270    int _unmatched;
    22712271
    2272     typedef MaxWeightedPerfectFractionalMatching<Graph, WeightMap> 
     2272    typedef MaxWeightedPerfectFractionalMatching<Graph, WeightMap>
    22732273    FractionalMatching;
    22742274    FractionalMatching *_fractional;
     
    30963096      _blossom_node_list.clear();
    30973097      _blossom_potential.clear();
    3098      
     3098
    30993099      if (_fractional == 0) {
    31003100        _fractional = new FractionalMatching(_graph, _weight, false);
     
    31623162          while (n != v) {
    31633163            subblossoms[--num] = _blossom_set->find(v);
    3164             v = _graph.target(_fractional->matching(v));           
     3164            v = _graph.target(_fractional->matching(v));
    31653165          }
    3166          
    3167           int surface = 
     3166
     3167          int surface =
    31683168            _blossom_set->join(subblossoms.begin(), subblossoms.end());
    31693169          (*_blossom_data)[surface].status = EVEN;
     
    31723172          (*_blossom_data)[surface].pot = 0;
    31733173          (*_blossom_data)[surface].offset = 0;
    3174          
     3174
    31753175          _tree_set->insert(surface);
    31763176          ++_unmatched;
     
    32223222          }
    32233223        }
    3224            
     3224
    32253225        if (!(*_node_data)[ni].heap.empty()) {
    32263226          _blossom_set->decrease(n, (*_node_data)[ni].heap.prio());
Note: See TracChangeset for help on using the changeset viewer.