Class implements the custom random variable. More...

#include <customRandomVariable.hpp>

Inheritance diagram for julian::CustomRandomVariable:
julian::RandomVariable

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...
 
CustomRandomVariableclone () const
 Virtual copy constructor. More...
 
- Public Member Functions inherited from julian::RandomVariable
virtual ~RandomVariable ()
 Destructor. More...
 

Private Attributes

SmartPointer< ProbabilityDistributiondist_
 
SmartPointer< UniformRNGurng_
 

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

julian::CustomRandomVariable::CustomRandomVariable ( )
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

CustomRandomVariable * julian::CustomRandomVariable::clone ( ) const
virtual

Virtual copy constructor.

Reimplemented from julian::RandomVariable.

double julian::CustomRandomVariable::getRandom ( )
overridevirtual

Generates random variable.

Methods uses inverse of CDF to generate random variable from specified distribution (see Chapter 10.4 [1])

Implements julian::RandomVariable.

std::vector< double > julian::CustomRandomVariable::getRandoms ( int  n)
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.

void julian::CustomRandomVariable::setSeed ( unsigned int  seed)
overridevirtual

Changes seed of RNG.

Implements julian::RandomVariable.

Member Data Documentation

SmartPointer<ProbabilityDistribution> julian::CustomRandomVariable::dist_
private

Probability distribution of random variable

SmartPointer<UniformRNG> julian::CustomRandomVariable::urng_
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