Browse Source
Add warning about heapsort implementation
pull/751/head
Benjamin Lehmann
6 years ago
No known key found for this signature in database
GPG Key ID: 524784255A9289B7
1 changed files with
3 additions and
0 deletions
-
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; |
|
|
|
|