pub struct CumulativeMax;Expand description
Cumulative maximum over every sample seen so far — a running extreme, O(1)
per tick. Option state seeds on the first sample (see CumulativeMin).
Mirrors the legacy max(Window::Unbounded).
Trait Implementations§
Source§impl Op for CumulativeMax
impl Op for CumulativeMax
Source§const ACTIVATION: Activation = Activation::NONE
const ACTIVATION: Activation = Activation::NONE
How this op is scheduled, declared statically so the engines can read
it at wiring time rather than infer it. See
Activation.Source§type Cfg = ()
type Cfg = ()
Construction-time configuration, closures included — a
map’s F
is its Cfg. Built at wiring, owned by the engine, handed to every
lifecycle function by &mut. () for an op that needs none.Source§type In<'a> = (&'a f64,)
type In<'a> = (&'a f64,)
The typed inputs for one cycle — upstream values by reference, plus a
bool tick flag wherever the op needs to know which input fired
((&T, bool)). A tuple for a fixed-arity op, a slice for a variadic
one, () for a source. The engine assembles it; ops never reach
upstream themselves.Source§fn cycle(
_cfg: &mut (),
state: &mut Option<f64>,
input: (&f64,),
_ctx: &mut Ctx<'_>,
) -> Result<Tick<f64>>
fn cycle( _cfg: &mut (), state: &mut Option<f64>, input: (&f64,), _ctx: &mut Ctx<'_>, ) -> Result<Tick<f64>>
Run one cycle: the op’s whole semantics, and the only function that
must be written. Returns
Tick::Value to produce and propagate,
Tick::Silent to update the value slot without waking downstream,
or Tick::Quiet to do neither. Err aborts the run with node
context.Source§fn start(
cfg: &mut Self::Cfg,
state: &mut Self::State,
ctx: &mut Ctx<'_>,
) -> Result<()>
fn start( cfg: &mut Self::Cfg, state: &mut Self::State, ctx: &mut Ctx<'_>, ) -> Result<()>
Called once before the first cycle. Sources use this to schedule
their first activation; IO ops open resources here.
Auto Trait Implementations§
impl Freeze for CumulativeMax
impl RefUnwindSafe for CumulativeMax
impl Send for CumulativeMax
impl Sync for CumulativeMax
impl Unpin for CumulativeMax
impl UnsafeUnpin for CumulativeMax
impl UnwindSafe for CumulativeMax
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more