Browse Source

Only sort bucket queue if more than 10% is unsorted

Former-commit-id: 7ebd1e49c8
tempestpy_adaptions
Mavo 8 years ago
parent
commit
b669a3acef
  1. 2
      src/storage/BucketPriorityQueue.cpp

2
src/storage/BucketPriorityQueue.cpp

@ -14,7 +14,7 @@ namespace storm {
template<typename ValueType>
void BucketPriorityQueue<ValueType>::fix() {
if (currentBucket < buckets.size() && nrUnsortedItems > 0) {
if (currentBucket < buckets.size() && nrUnsortedItems > buckets[currentBucket].size() / 10) {
// Fix current bucket
std::make_heap(buckets[currentBucket].begin(), buckets[currentBucket].end(), compare);
nrUnsortedItems = 0;

Loading…
Cancel
Save