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
* chores:
* update crates
* fix typos
* make clippy happy
* update info link
perf:
* Static Dispatch: By making Rolling<'a, U, F> generic over U: RollableUnivariate<F>, method calls (update, revert, get) use static dispatch (monomorphized code) instead of dynamic (vtable)
* same Static Dispatch techinic for iter.
* chores: fix typos
Copy file name to clipboardExpand all lines: src/quantile.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ use serde::{Deserialize, Serialize};
21
21
/// assert_eq!(running_quantile.get(), 5.0);
22
22
/// ```
23
23
/// # References
24
-
/// [^1]: [The P² Algorithm for Dynamic Univariateal Computing Calculation of Quantiles and Editor Histograms Without Storing Observations](https://www.cse.wustl.edu/~jain/papers/ftp/psqr.pdf)
24
+
/// [^1]: [The P² Algorithm for Dynamic Calculation of Quantiles and Histograms Without Storing Observations](https://www.cse.wustl.edu/~jain/papers/ftp/psqr.pdf)
25
25
///
26
-
/// [^2]: [P² quantile estimator: estimating the median without storing values](https://aakinshin.net/posts/p2-quantile-estimator/)
26
+
/// [^2]: [P² quantile estimator: estimating the median without storing values](https://aakinshin.net/posts/p2-quantile-estimator-intro/)
let oldest = self.window.front().copied().expect("Window should not be empty");// Optimization: copied() for clarity/safety (F is Copy-like for floats); expect for debug assert
69
+
matchself.to_roll.revert(oldest){
70
+
Ok(()) => (),// Assume revert returns Result<(), _>; adjust if different
62
71
Err(err) => panic!("{}", err),
63
72
};
64
73
self.window.pop_front();
@@ -73,6 +82,7 @@ impl<'a, F: Float + FromPrimitive + AddAssign + SubAssign> Univariate<F> for Rol
0 commit comments