lemon/random.h
branch1.0
changeset 302 3a2e0692eaae
parent 209 765619b7cbb2
child 340 c4aa9f097ef1
equal deleted inserted replaced
15:c96cd362b78b 16:fc290b6cc30f
   819     /// Standard Gauss distribution
   819     /// Standard Gauss distribution
   820 
   820 
   821     /// Standard Gauss distribution.
   821     /// Standard Gauss distribution.
   822     /// \note The Cartesian form of the Box-Muller
   822     /// \note The Cartesian form of the Box-Muller
   823     /// transformation is used to generate a random normal distribution.
   823     /// transformation is used to generate a random normal distribution.
   824     /// \todo Consider using the "ziggurat" method instead.
       
   825     double gauss()
   824     double gauss()
   826     {
   825     {
   827       double V1,V2,S;
   826       double V1,V2,S;
   828       do {
   827       do {
   829         V1=2*real<double>()-1;
   828         V1=2*real<double>()-1;