8 , m_context(0.0, type, 1.0, m_current_start, m_current_end, m_normal_spread)
9 , m_context_gpu(0.0, type, 1.0, m_current_start, m_current_end, m_normal_spread, get_gpu_data_buffer())
35 for (
auto& sample : samples) {
void configure(const std::string &key, std::any value)
Configures algorithm-specific parameters.
std::vector< double > batch(double min, double max, size_t count)
Batch generation.
Algorithm get_algorithm() const
Gets current algorithm.
void set_algorithm(Algorithm algo)
Changes active algorithm.
double m_amplitude
Base amplitude of the generator.
double normal_spread
Current variance parameter for normal distribution.
double amplitude
Current amplitude scaling factor.
double range_end
Current upper bound of the range.
double range_start
Current lower bound of the range.
Kinesis::Stochastic::Algorithm distribution_type
Current distribution type.
void notify_tick(double value) override
Notifies all registered callbacks about a new value.
Kinesis::Stochastic::Stochastic m_generator
Core stochastic generator instance.
void set_range(double start, double end)
Sets the output value range.
double m_normal_spread
Variance parameter for normal distribution.
Kinesis::Stochastic::Algorithm m_type
Current probability distribution algorithm.
NodeContext & get_last_context() override
Gets the last created context object.
Random(Kinesis::Stochastic::Algorithm type=Kinesis::Stochastic::Algorithm::UNIFORM)
Constructor for the stochastic generator.
std::vector< double > process_batch(unsigned int num_samples) override
Generates multiple stochastic values at once.
double m_current_start
Lower bound of the current output range.
void set_normal_spread(double spread)
Sets the variance parameter for normal distribution.
void set_type(Kinesis::Stochastic::Algorithm type)
Changes the probability distribution type.
double process_sample(double input=0.) override
Generates a single stochastic value.
void update_context(double value) override
Updates the context object with the current node state.
RandomContextGpu m_context_gpu
double m_current_end
Upper bound of the current output range.
double value
Current sample value.
Base context class for node callbacks.
std::vector< NodeHook > m_callbacks
Collection of standard callback functions.
bool m_state_saved
tracks if the node's state has been saved by a snapshot operation
bool m_networked_node
Flag indicating if the node is part of a NodeNetwork This flag is used to disable event firing when t...
double m_last_output
The most recent sample value generated by this oscillator.
bool m_fire_events_during_snapshot
Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don...
std::vector< std::pair< NodeHook, NodeCondition > > m_conditional_callbacks
Collection of conditional callback functions with their predicates.
bool m_gpu_compatible
Flag indicating if the node supports GPU processing This flag is set by derived classes to indicate w...
Algorithm
Stochastic and procedural generation algorithms.