pub trait BatchNanExt: Indicator<Input = f64, Output = f64> {
// Provided methods
fn batch_nan(&mut self, inputs: &[f64]) -> Vec<f64> { ... }
fn batch_fast(&mut self, inputs: &[f64]) -> Vec<f64> { ... }
}Expand description
Fast batch for scalar f64 -> f64 indicators.
The generic BatchExt::batch returns Vec<Option<f64>> — 16 bytes per
element (no niche fits an arbitrary f64), which a caller wanting a dense
f64 series then has to walk a second time to map warmup Nones to NaN.
This skips both the wide intermediate and the second pass: one allocation,
one pass, warmup encoded as NaN. Both methods allocate the result and fill
it through Indicator::batch_nan_into / Indicator::batch_fast_into,
so an indicator’s faster formulation reaches them too.
Provided Methods§
Sourcefn batch_nan(&mut self, inputs: &[f64]) -> Vec<f64>
fn batch_nan(&mut self, inputs: &[f64]) -> Vec<f64>
One f64 per input, warmup positions filled with NaN, bit-for-bit equal
to replaying update.
Sourcefn batch_fast(&mut self, inputs: &[f64]) -> Vec<f64>
fn batch_fast(&mut self, inputs: &[f64]) -> Vec<f64>
The opt-in fast batch (Indicator::batch_fast_into) into a fresh
vector: within the indicator’s documented tolerance of
batch_nan, deterministic across platforms.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".