Browse Source

Add warning about heapsort implementation

pull/751/head
Benjamin Lehmann 6 years ago
parent
commit
bc330397ea
No known key found for this signature in database GPG Key ID: 524784255A9289B7
  1. 3
      src/Numerics/Sorting.cs

3
src/Numerics/Sorting.cs

@ -496,6 +496,9 @@ namespace MathNet.Numerics
}
else if (recursions > max_recursion_depth) // Heapsort is guaranteed O(n log n)
{
// NOTE, there is something wrong with this heapsort implementation. I don't know what, but this fails when the max recursion depth is set too low.
BuildMaxHeap(keys, satelliteData, comparer, left, right);
int heapBoundary = right;

Loading…
Cancel
Save