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

◆ get_poisson_random()

MAYAFLUX_API double MayaFlux::get_poisson_random ( double  start = 0,
double  end = 1 
)

Generates a poisson random number.

Parameters
startLower bound for scaling
endUpper bound for scaling
Returns
Random number with poisson distribution

Uses the random number generator from the default engine.

Definition at line 31 of file Random.cpp.

32{
33 get_context().get_random_engine()->set_type(Utils::distribution::POISSON);
34 return get_context().get_random_engine()->random_sample(start, end);
35}
Nodes::Generator::Stochastics::Random * get_random_engine()
Gets the stochastic signal generator engine.
Definition Engine.hpp:274
void set_type(Utils::distribution type)
Changes the probability distribution type.
double random_sample(double start, double end)
Generates a stochastic value within a specified range.
Core::Engine & get_context()
Gets the default engine instance.
Definition Core.cpp:56

References get_context(), MayaFlux::Core::Engine::get_random_engine(), MayaFlux::Utils::POISSON, MayaFlux::Nodes::Generator::Stochastics::Random::random_sample(), and MayaFlux::Nodes::Generator::Stochastics::Random::set_type().

+ Here is the call graph for this function: