You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Measures-of-presortedness.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,16 +231,11 @@ Computes the *Oscillation* measure described by C. Levcopoulos and O. Petersson
231
231
| Complexity | Memory | Iterators |
232
232
| ----------- | ----------- | ------------- |
233
233
| n log n | n | Forward |
234
-
| n² | 1 | Forward |
235
-
236
-
When there isn't enough extra memory available, `probe::osc` falls back to an in-place O(n²) algorithm.
237
234
238
235
`max_for_size`: (|*X*| * (|*X*| - 2) - 1) / 2 when the values in *X* are strongly oscillating.
239
236
240
237
**Note:***Osc* does not respect Mannila's criterion 5: $Osc(\langle 2, 4, 1, 3, 1, 3 \rangle) \not \le |\langle 4, 1, 3, 1, 3 \rangle| + Osc(\langle 4, 1, 3, 1, 3 \rangle)$, though it is possible that it only happens when equivalent elements are involved.
241
238
242
-
***WARNING:** the O(n²) fallback of `probe::osc` is deprecated since version 1.12.0 and removed in version 2.0.0.*
243
-
244
239
*Changed in version 1.12.0:*`probe::osc` is now O(n log n) instead of O(n²) but now also requires O(n) memory. The O(n²) is kept for backward compatibility but will be removed in the future.
0 commit comments