7#ifndef KISSPRAYRANDOMDISTRIBUTIONS_H
8#define KISSPRAYRANDOMDISTRIBUTIONS_H
10#include <QScopedPointer>
40 template <
typename Function>
76 template <
typename Function>
77 void initialize(
size_t numberOfSamples,
double a,
double b, Function f);
81 QScopedPointer<Private>
m_d;
102 double min()
const {
return 0.0; }
107 double max()
const {
return 1.0; }
Class that can generate randomly distributed values in the range [0..1] that follow a distribution th...
KisSprayClusterBasedDistributionPolarDistance()
Class that can generate randomly distributed values in the range [0..1] that follow a distribution th...
KisSprayClusterBasedDistribution()
Construct an invalid KisSprayClusterBasedDistribution.
Class that can generate randomly distributed values in the range [0..1] that follow a distribution gi...
KisSprayCurveBasedDistributionPolarDistance()
Class that can generate randomly distributed values in the range [0..1] that follow a distribution gi...
KisSprayCurveBasedDistribution()
Construct an invalid KisSprayCurveBasedDistribution.
Class that can generate randomly distributed values in the range [a..b] following an arbitrary pdf.
double min() const
Return the minimum value that this distribution can produce.
void initialize(size_t numberOfSamples, double a, double b, Function f)
Function used to setup the distribution and put it in a valid state. See the constructor for the expl...
QScopedPointer< Private > m_d
KisSprayFunctionBasedDistribution()
Construct an invalid KisSprayFunctionBasedDistribution.
KisSprayFunctionBasedDistribution & operator=(const KisSprayFunctionBasedDistribution &rhs)
bool isValid() const
Return if this object is correctly initialized and can be used to generate values.
double max() const
Return the maximum value that this distribution can produce.
double operator()(KisRandomSourceSP rs) const
Get a random value between min and max that follows the distribution.
~KisSprayFunctionBasedDistribution()
Class that can generate normally distributed values. For efficiency, the values will be in the range ...
KisSprayNormalDistributionPolarDistance()
Class that can generate normally distributed values. For efficiency, the values will be in the range ...
KisSprayNormalDistribution()
Construct an invalid KisSprayNormalDistribution.