Changeset 3615 in Sophya for trunk/SophyaLib/NTools/perandom.h


Ignore:
Timestamp:
May 1, 2009, 1:34:31 PM (16 years ago)
Author:
cmv
Message:

Modifs relatives a l'introduction de RandomGeneratorInterface + delete de srandgen.c, cmv 01/05/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/perandom.h

    r3608 r3615  
    1212#include "tvector.h"
    1313#include "histos.h"
    14 #include "srandgen.h"
    1514#include "classfunc.h"
    16 #include <complex>
    1715
    1816namespace SOPHYA { 
     
    5452};
    5553
    56 
    57 /*!
    58   \ingroup NTools
    59   \brief Returns a random complex number such that real and imaginary parts are gaussians with variance sig^2
    60 */
    61 inline complex< r_8 > ComplexGaussRan(void)
    62   {return complex< r_8 >(NorRand(),NorRand());}
    63 inline complex< r_8 > ComplexGaussRan(double sig)
    64   {return complex< r_8 >(GauRnd(0.,sig),GauRnd(0.,sig));}
    65 
    66 /*!
    67   \ingroup NTools
    68   \brief Returns the module of a random complex number generated by ComplexGaussRan
    69 */
    70 inline double ModComplexGaussRan(double sig=1.)
    71   {double r=-log(1.-drand01()); return sig*sqrt(2.*r);}
    72 
    7354} // namespace SOPHYA
    7455
Note: See TracChangeset for help on using the changeset viewer.