Instantiate a new Engine;
Define a generator by instantiating a distribution given the new Engine;
Use non-static methods fire() to shoot random values with the new generator.
- RanluxEngine RLX=new RanluxEngine(12453453,4);
RandExponential ExpDist(RLX);
:
RLX->setSeed(43122315);
double m=2;
double num=ExpDist.fire(m);
- RanluxEngine RLX=new RanluxEngine(12453453,4);
The associated Engine is destroyed by the distributions destructor if passed by pointer.
Previous slide | Next slide | Back to first slide | View graphic version |