|
Krita Source Code Documentation
|
Class that can generate randomly distributed values in the range [0..1] that follow a distribution that clusters the values towards 0 or 1. More...
#include <KisSprayRandomDistributions.h>
Inheritance diagram for KisSprayClusterBasedDistribution:Public Member Functions | |
| KisSprayClusterBasedDistribution () | |
| Construct an invalid KisSprayClusterBasedDistribution. | |
| KisSprayClusterBasedDistribution (double clusteringAmount) | |
| Construct a new cluster based distribution. | |
Public Member Functions inherited from KisSprayFunctionBasedDistribution | |
| bool | isValid () const |
| Return if this object is correctly initialized and can be used to generate values. | |
| KisSprayFunctionBasedDistribution () | |
| Construct an invalid KisSprayFunctionBasedDistribution. | |
| KisSprayFunctionBasedDistribution (const KisSprayFunctionBasedDistribution &other) | |
| template<typename Function > | |
| KisSprayFunctionBasedDistribution (int numberOfSamples, double a, double b, Function f) | |
| Construct a new distribution. | |
| double | max () const |
| Return the maximum value that this distribution can produce. | |
| double | min () const |
| Return the minimum value that this distribution can produce. | |
| double | operator() (KisRandomSourceSP rs) const |
| Get a random value between min and max that follows the distribution. | |
| KisSprayFunctionBasedDistribution & | operator= (const KisSprayFunctionBasedDistribution &rhs) |
| ~KisSprayFunctionBasedDistribution () | |
Additional Inherited Members | |
Protected Member Functions inherited from KisSprayFunctionBasedDistribution | |
| template<typename Function > | |
| 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 explanation of the parameters. | |
Class that can generate randomly distributed values in the range [0..1] that follow a distribution that clusters the values towards 0 or 1.
Definition at line 165 of file KisSprayRandomDistributions.h.
| KisSprayClusterBasedDistribution::KisSprayClusterBasedDistribution | ( | ) |
Construct an invalid KisSprayClusterBasedDistribution.
Definition at line 266 of file KisSprayRandomDistributions.cpp.
|
explicit |
Construct a new cluster based distribution.
| clusteringAmount | A value in the range [-100..100] that indicates how and how much the generated values should cluster. A positive clustering amount will make generated values cluster towards 0 whereas a negative amount will cluster them towards 1. The bigger the clustering amount, the more pronounced will be the clustering, and the smaller it is, the more evenly distributed the values will be |
Definition at line 269 of file KisSprayRandomDistributions.cpp.
References KisSprayFunctionBasedDistribution::initialize(), and KIS_SAFE_ASSERT_RECOVER_RETURN.