Class implements the custom random variable. More...
#include <customRandomVariable.hpp>
Public Member Functions | |
CustomRandomVariable () | |
Default constructor. More... | |
CustomRandomVariable (SmartPointer< ProbabilityDistribution >, SmartPointer< UniformRNG >) | |
constructor More... | |
double | getRandom () override |
Generates random variable. More... | |
std::vector< double > | getRandoms (int) override |
Generates set of random variable. More... | |
void | setSeed (unsigned int) override |
Changes seed of RNG. More... | |
CustomRandomVariable * | clone () const |
Virtual copy constructor. More... | |
Public Member Functions inherited from julian::RandomVariable | |
virtual | ~RandomVariable () |
Destructor. More... | |
Private Attributes | |
SmartPointer< ProbabilityDistribution > | dist_ |
SmartPointer< UniformRNG > | urng_ |
Detailed Description
Class implements the custom random variable.
Custom random variable implements a Strategy Design Pattern. It captures the abstraction of random variable composed of Random Number Generator and Probability Distribution. RNG and distribution can be change independently.
- Examples:
- simulatedAnnealingExample.cpp.
Constructor & Destructor Documentation
|
inline |
Default constructor.
Default inputs are Tausworthe RNG and standard normal distribution.
julian::CustomRandomVariable::CustomRandomVariable | ( | SmartPointer< ProbabilityDistribution > | dist, |
SmartPointer< UniformRNG > | urng | ||
) |
constructor
Member Function Documentation
|
virtual |
Virtual copy constructor.
Reimplemented from julian::RandomVariable.
|
overridevirtual |
Generates random variable.
Methods uses inverse of CDF to generate random variable from specified distribution (see Chapter 10.4 [1])
Implements julian::RandomVariable.
|
overridevirtual |
Generates set of random variable.
Methods uses inverse of CDF to generate random variable from specified distribution (see Chapter 10.4 [1])
Implements julian::RandomVariable.
|
overridevirtual |
Changes seed of RNG.
Implements julian::RandomVariable.
Member Data Documentation
|
private |
Probability distribution of random variable
|
private |
Pseudo-random generator used to generate random numbers.
The documentation for this class was generated from the following files:
- C:/Unix/home/OEM/jULIAN/src/mathematics/distributions/customRandomVariable.hpp
- C:/Unix/home/OEM/jULIAN/src/mathematics/distributions/customRandomVariable.cpp