|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Two-level hysteresis turning a continuous value into a held boolean. More...
#include <FeatureExtent.hpp>
Collaboration diagram for MayaFlux::Kinesis::ThresholdLatch:Public Member Functions | |
| bool | engaged () const |
| Current state without feeding a value. | |
| void | reset () |
| Force the latch off, for use on a known discontinuity. | |
| ThresholdLatch (double engage, double release) | |
| Construct a latch. | |
| bool | update (double value) |
| Feed one value and report the resulting state. | |
Private Attributes | |
| double | m_engage |
| bool | m_engaged { false } |
| double | m_release |
Two-level hysteresis turning a continuous value into a held boolean.
A single threshold on a noisy continuous membership produces a rapid alternation whenever the value sits near it, which downstream reads as many separate occurrences of one event. Two levels separate the point at which the latch engages from the point at which it releases, so a value hovering between them holds whatever state it last reached.
The gap between the levels is the caller's decision and depends on how noisy the incoming value is; there is no defensible default, so both are required at construction.
Definition at line 380 of file FeatureExtent.hpp.