1 /* ----------------------------------------------------------------------
2    SPARTA - Stochastic PArallel Rarefied-gas Time-accurate Analyzer
3    http://sparta.sandia.gov
4    Steve Plimpton, sjplimp@sandia.gov, Michael Gallis, magalli@sandia.gov
5    Sandia National Laboratories
6 
7    Copyright (2014) Sandia Corporation.  Under the terms of Contract
8    DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
9    certain rights in this software.  This software is distributed under
10    the GNU General Public License.
11 
12    See the README file in the top-level SPARTA directory.
13 ------------------------------------------------------------------------- */
14 
15 #ifndef SPARTA_RAN_KNUTH_H
16 #define SPARTA_RAN_KNUTH_H
17 
18 namespace SPARTA_NS {
19 
20 class RanKnuth {
21  public:
22   RanKnuth(int);
23   RanKnuth(double);
~RanKnuth()24   ~RanKnuth() {}
25   void reset(double, int, int);
26   double uniform();
27   double gaussian();
28 
29  private:
30   int seed,save;
31   double second;
32   int not_init,inext,inextp;
33   int ma[56];
34 };
35 
36 }
37 
38 #endif
39