chrono::ChContinuumDistribution Class Reference

## 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 <ChDistribution.h>

Inheritance diagram for chrono::ChContinuumDistribution:
Collaboration diagram for chrono::ChContinuumDistribution:

## Public Member Functions

ChContinuumDistribution (ChVectorDynamic<> &mx, ChVectorDynamic<> &my)
Create an object that can be used to generate sample numbers according to a generic probability distribution. More...

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. More...

const ChVectorDynamic & GetProbabilityXpoints () const

const ChVectorDynamic & GetProbabilityYpoints () const

const ChVectorDynamic & GetProbabilityCDFcumulativeX () const

const ChVectorDynamic & GetProbabilityCDFcumulativeY () const

Public Member Functions inherited from chrono::ChDistribution
virtual ~ChDistribution ()
Default destructor for distribution object.

## Constructor & Destructor Documentation

 chrono::ChContinuumDistribution::ChContinuumDistribution ( ChVectorDynamic<> & mx, ChVectorDynamic<> & my )

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

 double chrono::ChContinuumDistribution::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.