gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge #356
0 2 0
merge default
2 files changed with 71 insertions and 2 deletions:
↑ Collapse diff ↑
Show white space 6 line context
... ...
@@ -812,2 +812,3 @@
812 812
      }
813

	
813 814
      if (!_node_potential) {
... ...
@@ -815,2 +816,3 @@
815 816
      }
817

	
816 818
      if (!_blossom_set) {
... ...
@@ -819,2 +821,5 @@
819 821
        _blossom_data = new RangeMap<BlossomData>(_blossom_num);
822
      } else if (_blossom_data->size() != _blossom_num) {
823
        delete _blossom_data;
824
        _blossom_data = new RangeMap<BlossomData>(_blossom_num);
820 825
      }
... ...
@@ -825,3 +830,7 @@
825 830
        _node_data = new RangeMap<NodeData>(_node_num,
826
                                              NodeData(*_node_heap_index));
831
                                            NodeData(*_node_heap_index));
832
      } else {
833
        delete _node_data;
834
        _node_data = new RangeMap<NodeData>(_node_num,
835
                                            NodeData(*_node_heap_index));
827 836
      }
... ...
@@ -831,3 +840,6 @@
831 840
        _tree_set = new TreeSet(*_tree_set_index);
841
      } else {
842
        _tree_set_index->resize(_blossom_num);
832 843
      }
844

	
833 845
      if (!_delta1) {
... ...
@@ -836,2 +848,3 @@
836 848
      }
849

	
837 850
      if (!_delta2) {
... ...
@@ -839,3 +852,6 @@
839 852
        _delta2 = new BinHeap<Value, IntIntMap>(*_delta2_index);
853
      } else {
854
        _delta2_index->resize(_blossom_num);
840 855
      }
856

	
841 857
      if (!_delta3) {
... ...
@@ -844,2 +860,3 @@
844 860
      }
861

	
845 862
      if (!_delta4) {
... ...
@@ -847,2 +864,4 @@
847 864
        _delta4 = new BinHeap<Value, IntIntMap>(*_delta4_index);
865
      } else {
866
        _delta4_index->resize(_blossom_num);
848 867
      }
... ...
@@ -1590,2 +1609,5 @@
1590 1609

	
1610
      _blossom_node_list.clear();
1611
      _blossom_potential.clear();
1612

	
1591 1613
      for (ArcIt e(_graph); e != INVALID; ++e) {
... ...
@@ -1603,5 +1625,12 @@
1603 1625
      }
1604

	
1626
      
1605 1627
      _unmatched = _node_num;
1606 1628

	
1629
      _delta1->clear();
1630
      _delta2->clear();
1631
      _delta3->clear();
1632
      _delta4->clear();
1633
      _blossom_set->clear();
1634
      _tree_set->clear();
1635

	
1607 1636
      int index = 0;
... ...
@@ -1616,2 +1645,4 @@
1616 1645
        (*_node_index)[n] = index;
1646
        (*_node_data)[index].heap_index.clear();
1647
        (*_node_data)[index].heap.clear();
1617 1648
        (*_node_data)[index].pot = max;
... ...
@@ -2239,2 +2270,3 @@
2239 2270
      }
2271

	
2240 2272
      if (!_node_potential) {
... ...
@@ -2242,2 +2274,3 @@
2242 2274
      }
2275

	
2243 2276
      if (!_blossom_set) {
... ...
@@ -2246,2 +2279,5 @@
2246 2279
        _blossom_data = new RangeMap<BlossomData>(_blossom_num);
2280
      } else if (_blossom_data->size() != _blossom_num) {
2281
        delete _blossom_data;
2282
        _blossom_data = new RangeMap<BlossomData>(_blossom_num);
2247 2283
      }
... ...
@@ -2253,2 +2289,6 @@
2253 2289
                                            NodeData(*_node_heap_index));
2290
      } else if (_node_data->size() != _node_num) {
2291
        delete _node_data;
2292
        _node_data = new RangeMap<NodeData>(_node_num,
2293
                                            NodeData(*_node_heap_index));
2254 2294
      }
... ...
@@ -2258,3 +2298,6 @@
2258 2298
        _tree_set = new TreeSet(*_tree_set_index);
2299
      } else {
2300
        _tree_set_index->resize(_blossom_num);
2259 2301
      }
2302

	
2260 2303
      if (!_delta2) {
... ...
@@ -2262,3 +2305,6 @@
2262 2305
        _delta2 = new BinHeap<Value, IntIntMap>(*_delta2_index);
2306
      } else {
2307
        _delta2_index->resize(_blossom_num);
2263 2308
      }
2309

	
2264 2310
      if (!_delta3) {
... ...
@@ -2267,2 +2313,3 @@
2267 2313
      }
2314

	
2268 2315
      if (!_delta4) {
... ...
@@ -2270,2 +2317,4 @@
2270 2317
        _delta4 = new BinHeap<Value, IntIntMap>(*_delta4_index);
2318
      } else {
2319
        _delta4_index->resize(_blossom_num);
2271 2320
      }
... ...
@@ -2970,2 +3019,5 @@
2970 3019

	
3020
      _blossom_node_list.clear();
3021
      _blossom_potential.clear();
3022

	
2971 3023
      for (ArcIt e(_graph); e != INVALID; ++e) {
... ...
@@ -2983,2 +3035,8 @@
2983 3035

	
3036
      _delta2->clear();
3037
      _delta3->clear();
3038
      _delta4->clear();
3039
      _blossom_set->clear();
3040
      _tree_set->clear();
3041

	
2984 3042
      int index = 0;
... ...
@@ -2993,2 +3051,4 @@
2993 3051
        (*_node_index)[n] = index;
3052
        (*_node_data)[index].heap_index.clear();
3053
        (*_node_data)[index].heap.clear();
2994 3054
        (*_node_data)[index].pot = max;
Ignore white space 6 line context
... ...
@@ -1290,2 +1290,11 @@
1290 1290

	
1291
    /// \brief Clears the union-find data structure
1292
    ///
1293
    /// Erase each item from the data structure.
1294
    void clear() {
1295
      nodes.clear();
1296
      classes.clear();
1297
      first_free_node = first_free_class = first_class = -1;
1298
    }
1299

	
1291 1300
    /// \brief Insert a new node into a new component.
0 comments (0 inline)