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

◆ rebuild_distributions_if_needed()

void MayaFlux::Nodes::Generator::Stochastics::Random::rebuild_distributions_if_needed ( )
privatenoexcept

Rebuilds distribution objects if parameters have changed.

This method checks if any distribution parameters have been modified since the last generation and rebuilds the internal distribution objects accordingly to ensure accurate statistical behavior.

Definition at line 105 of file Stochastic.cpp.

106{
107 if (!m_dist_dirty)
108 return;
109
110 const double range = m_current_end - m_current_start;
111 m_normal_dist = std::normal_distribution<double>(0.0, range / m_normal_spread);
112 m_exponential_dist = std::exponential_distribution<double>(1.0);
113
117 m_dist_dirty = false;
118}
std::exponential_distribution< double > m_exponential_dist
Exponential distribution with lambda = 1.
double m_normal_spread
Variance parameter for normal distribution.
std::normal_distribution< double > m_normal_dist
Normal distribution with mean 0 and standard deviation 1.
double m_current_start
Lower bound of the current output range.
double m_current_end
Upper bound of the current output range.

References m_cached_end, m_cached_spread, m_cached_start, m_current_end, m_current_start, m_dist_dirty, m_exponential_dist, m_normal_dist, and m_normal_spread.

Referenced by generate_distributed_sample().

+ Here is the caller graph for this function: