Tsld016

  • 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);
  • The associated Engine is destroyed by the distribution’s destructor if passed by pointer.

Previous slide Next slide Back to first slide View graphic version