Changeset 3604 in Sophya for trunk/SophyaLib/BaseTools/randr48.h


Ignore:
Timestamp:
Apr 29, 2009, 12:14:04 PM (16 years ago)
Author:
ansari
Message:

Modifs,petites extensions + numero de version/initialisation de l'instance globale de RandomGenerator, Reza 29/04/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/randr48.h

    r3602 r3604  
    1616namespace SOPHYA {
    1717
    18 //! Pseudorandom number generator class using dSFMT code
     18//! Implementation of the RandomGeneratorInterface class using drand48() functions
    1919class DR48RandGen : public RandomGeneratorInterface {
    2020
     
    3939//--------------------------------------------------------------------------------
    4040
     41//! Version thread-safe de RandomGeneratorInterface avec drand48() functions
    4142class ThSDR48RandGen : public DR48RandGen {
    4243
     
    6263  // ---- protected methods
    6364  void GenSeq();
    64   inline r_8 Next()
    65     {
    66       if (rseq_.Size() == 0)  return drand48();
    67       else {
    68         if(idx_==rseq_.Size()) GenSeq();
    69         return(rseq_(idx_++));
    70       }
    71     }
     65  virtual r_8 Next();
     66
    7267  // Non thread-safe version of Init() and GetSeed()
    7368  void SetSeed_P(uint_2 seed[3]);
Note: See TracChangeset for help on using the changeset viewer.