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

◆ random_sample()

double MayaFlux::Nodes::Generator::Stochastics::Random::random_sample ( double  start,
double  end 
)

Generates a stochastic value within a specified range.

Parameters
startLower bound of the range
endUpper bound of the range
Returns
Value within the specified range based on current distribution

This method provides precise control over the output range while maintaining the statistical properties of the selected distribution.

Definition at line 21 of file Stochastic.cpp.

22{
23 validate_range(start, end);
24 m_current_start = start;
25 m_current_end = end;
27}
double m_amplitude
Base amplitude of the generator.
void validate_range(double start, double end) const
Validates that the specified range is mathematically valid.
double transform_sample(double sample, double start, double end) const
Transforms a raw value to fit within the specified range.
double m_current_start
Lower bound of the current output range.
double generate_distributed_sample()
Generates a raw value according to the current distribution.
double m_current_end
Upper bound of the current output range.

References generate_distributed_sample(), MayaFlux::Nodes::Generator::Generator::m_amplitude, m_current_end, m_current_start, transform_sample(), and validate_range().

Referenced by MayaFlux::get_exponential_random(), MayaFlux::get_gaussian_random(), MayaFlux::get_poisson_random(), MayaFlux::get_uniform_random(), and process_sample().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: