|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
|
inline |
Compute the N-th derivative, routed through a configured HampelFilter for that order if one exists.
| N | Derivative order, forwarded to Differential::backward_difference |
Idempotent within a single update() cycle: the result for a given N is computed once and cached against the current generation counter (incremented every update()), and repeat calls to derivative<N>() before the next update() return the cached value rather than recomputing. This matters specifically because a configured HampelFilter's accept() has side effects (it may push into its own window or advance its rejection counter); calling derivative<N>() twice per frame without memoization would run accept() twice against the same underlying data in the same frame and silently corrupt the filter's state.
Definition at line 185 of file MotionChannel.hpp.
References MayaFlux::Kinesis::MotionChannel< T >::m_derivative_cache, MayaFlux::Kinesis::MotionChannel< T >::m_filters, MayaFlux::Kinesis::MotionChannel< T >::m_generation, MayaFlux::Kinesis::MotionChannel< T >::m_history, MayaFlux::Kinesis::MotionChannel< T >::m_last_dt, and N.
Referenced by MayaFlux::Kinesis::channel_curvature().
Here is the caller graph for this function: