MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ bernoulli_gate_state()

MAYAFLUX_API std::vector< double > MayaFlux::Kinesis::Discrete::bernoulli_gate_state ( double  probability,
uint32_t  seed = 0,
double  threshold = 0.5 
)

Builds the array bernoulli_gate reads and writes.

Parameters
probabilityChance each pulse passes, 0 to 1
seedGenerator state; zero selects a fixed seed
thresholdLevel the input must rise through

Layout: [threshold, latched, probability, state, pass].

Definition at line 124 of file Boolean.cpp.

125{
126 return { threshold, 0.0, probability, static_cast<double>(seed == 0 ? DEFAULT_SEED : seed), 0.0 };
127}
float threshold

References threshold.