DecreasingValue Filter

template<typename T>
struct DecreasingValue

Filter that only accepts decreasing values.

This filter propagates changes only when the new value is strictly less than the previous value, useful for monitoring downward trends.

Since

v0.1.0

// Example: Only propagate when battery level decreases
Signal<int, 10, DecreasingValue<int>> battery(100);

Warning

Only accepts arithmetic types (integral and floating-point).

Template Parameters:
typename T

Arithmetic type.

Public Functions

inline bool operator()(const T &old_value, const T &new_value) const

See Also