lemon/max_matching.h
changeset 2550 f26368148b9c
parent 2548 a3ba22ebccc6
child 2553 bfced05fa852
equal deleted inserted replaced
13:2ceb99271674 14:2c3ff66afa6c
    28 #include <lemon/graph_utils.h>
    28 #include <lemon/graph_utils.h>
    29 #include <lemon/bin_heap.h>
    29 #include <lemon/bin_heap.h>
    30 
    30 
    31 ///\ingroup matching
    31 ///\ingroup matching
    32 ///\file
    32 ///\file
    33 ///\brief Maximum matching algorithm in undirected graph.
    33 ///\brief Maximum matching algorithms in undirected graph.
    34 
    34 
    35 namespace lemon {
    35 namespace lemon {
    36 
    36 
    37   ///\ingroup matching
    37   ///\ingroup matching
    38   ///
    38   ///
  1465 
  1465 
  1466       Value offset = (*_blossom_data)[blossom].offset;
  1466       Value offset = (*_blossom_data)[blossom].offset;
  1467       int b = _blossom_set->find(_ugraph.source(pred));
  1467       int b = _blossom_set->find(_ugraph.source(pred));
  1468       int d = _blossom_set->find(_ugraph.source(next));
  1468       int d = _blossom_set->find(_ugraph.source(next));
  1469       
  1469       
  1470       int ib, id;
  1470       int ib = -1, id = -1;
  1471       for (int i = 0; i < int(subblossoms.size()); ++i) {
  1471       for (int i = 0; i < int(subblossoms.size()); ++i) {
  1472 	if (subblossoms[i] == b) ib = i;
  1472 	if (subblossoms[i] == b) ib = i;
  1473 	if (subblossoms[i] == d) id = i;
  1473 	if (subblossoms[i] == d) id = i;
  1474 
  1474 
  1475 	(*_blossom_data)[subblossoms[i]].offset = offset;
  1475 	(*_blossom_data)[subblossoms[i]].offset = offset;
  2652 
  2652 
  2653       Value offset = (*_blossom_data)[blossom].offset;
  2653       Value offset = (*_blossom_data)[blossom].offset;
  2654       int b = _blossom_set->find(_ugraph.source(pred));
  2654       int b = _blossom_set->find(_ugraph.source(pred));
  2655       int d = _blossom_set->find(_ugraph.source(next));
  2655       int d = _blossom_set->find(_ugraph.source(next));
  2656       
  2656       
  2657       int ib, id;
  2657       int ib = -1, id = -1;
  2658       for (int i = 0; i < int(subblossoms.size()); ++i) {
  2658       for (int i = 0; i < int(subblossoms.size()); ++i) {
  2659 	if (subblossoms[i] == b) ib = i;
  2659 	if (subblossoms[i] == b) ib = i;
  2660 	if (subblossoms[i] == d) id = i;
  2660 	if (subblossoms[i] == d) id = i;
  2661 
  2661 
  2662 	(*_blossom_data)[subblossoms[i]].offset = offset;
  2662 	(*_blossom_data)[subblossoms[i]].offset = offset;