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

◆ process_batch()

std::vector< double > MayaFlux::Nodes::Generator::Random::process_batch ( unsigned int  num_samples)
overridevirtual

Generates multiple stochastic values at once.

Parameters
num_samplesNumber of values to generate
Returns
Vector of generated values

This method efficiently generates multiple values in a single operation, useful for batch processing or filling buffers.

Implements MayaFlux::Nodes::Node.

Definition at line 31 of file Nodes/Generators/Random.cpp.

32{
33 auto samples = m_generator.batch(m_current_start, m_current_end, num_samples);
34
35 for (auto& sample : samples) {
36 sample *= m_amplitude;
37 }
38
39 return samples;
40}
std::vector< double > batch(double min, double max, size_t count)
Batch generation.
double m_amplitude
Base amplitude of the generator.
Kinesis::Stochastic::Stochastic m_generator
Core stochastic generator instance.
double m_current_start
Lower bound of the current output range.
double m_current_end
Upper bound of the current output range.

References MayaFlux::Kinesis::Stochastic::Stochastic::batch(), MayaFlux::Nodes::Generator::Generator::m_amplitude, m_current_end, m_current_start, and m_generator.

+ Here is the call graph for this function: