Description
Class that can be used to generate sample numbers according to a probability distribution.
Probability distribution is defined with x,y points, at least a dozen of pairs to be more precise in the reconstruction of probability. It uses the "Smirnov transform" (inverse probability integral transform)
#include <ChRandom.h>


Public Member Functions | |
ChContinuumDistribution (ChVectorDynamic<> &x, ChVectorDynamic<> &y) | |
Create an object that can be used to generate sample numbers according to a generic probability distribution. | |
virtual double | GetRandom () override |
Compute a random value whose probability is the probability curve that has been entered with x,y points during the creation of this object. | |
const ChVectorDynamic & | GetProbabilityXPoints () const |
const ChVectorDynamic & | GetProbabilityYPoints () const |
const ChVectorDynamic & | GetProbabilityCDFCumulativeX () const |
const ChVectorDynamic & | GetProbabilityCDFCumulativeY () const |
![]() |
Constructor & Destructor Documentation
◆ ChContinuumDistribution()
chrono::ChContinuumDistribution::ChContinuumDistribution | ( | ChVectorDynamic<> & | x, |
ChVectorDynamic<> & | y ) |
Create an object that can be used to generate sample numbers according to a generic probability distribution.
The probability distribution is a curve represented by simplified x,y pairs of points. The integral of the probability curve must be unit, i.e normalized (but if not, a normalization will be enforced) Note: too few points means approximate results, but too many points might give a small performance overhead when calling GetRandom().
Member Function Documentation
◆ GetRandom()
|
overridevirtual |
Compute a random value whose probability is the probability curve that has been entered with x,y points during the creation of this object.
Implements chrono::ChDistribution.
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono/core/ChRandom.h
- C:/M/B/src/chrono-9.0.1/src/chrono/core/ChRandom.cpp