diff -r 07ec2b52e53d -r 7f6e2bd76654 lemon/matching.h --- a/lemon/matching.h Wed Mar 17 10:29:57 2010 +0100 +++ b/lemon/matching.h Wed Mar 17 12:35:52 2010 +0100 @@ -1675,6 +1675,9 @@ /// matching. This initialization is also called jumpstart heuristic. void fractionalInit() { createStructures(); + + _blossom_node_list.clear(); + _blossom_potential.clear(); if (_fractional == 0) { _fractional = new FractionalMatching(_graph, _weight, false); @@ -1697,11 +1700,20 @@ _unmatched = 0; + _delta1->clear(); + _delta2->clear(); + _delta3->clear(); + _delta4->clear(); + _blossom_set->clear(); + _tree_set->clear(); + int index = 0; for (NodeIt n(_graph); n != INVALID; ++n) { Value pot = _fractional->nodeValue(n); (*_node_index)[n] = index; (*_node_data)[index].pot = pot; + (*_node_data)[index].heap_index.clear(); + (*_node_data)[index].heap.clear(); int blossom = _blossom_set->insert(n, std::numeric_limits::max()); @@ -3080,6 +3092,9 @@ /// matching. This initialization is also called jumpstart heuristic. void fractionalInit() { createStructures(); + + _blossom_node_list.clear(); + _blossom_potential.clear(); if (_fractional == 0) { _fractional = new FractionalMatching(_graph, _weight, false); @@ -3102,11 +3117,19 @@ _unmatched = 0; + _delta2->clear(); + _delta3->clear(); + _delta4->clear(); + _blossom_set->clear(); + _tree_set->clear(); + int index = 0; for (NodeIt n(_graph); n != INVALID; ++n) { Value pot = _fractional->nodeValue(n); (*_node_index)[n] = index; (*_node_data)[index].pot = pot; + (*_node_data)[index].heap_index.clear(); + (*_node_data)[index].heap.clear(); int blossom = _blossom_set->insert(n, std::numeric_limits::max());