Probability Filter¶
-
template<typename T, uint8_t Percent>
struct Probability¶ Filter that accepts with a given probability percentage.
This filter randomly accepts or rejects changes based on the specified percentage, useful for probabilistic sampling or statistical monitoring.
- Since
v0.1.0
// Example: Accept 25% of changes randomly Signal<int, 10, Probability<int, 25>> sample(0);Note
Non-deterministic, results vary on each call.
Warning
Percentmust be between 0 and 100.Uses
random()function.
See Also¶
Probabilistic Filters - Overview