Last change
on this file since 2322 was 1371, checked in by ansari, 25 years ago |
MAJ documentation, Makefile, ... - Reza 5/1/2001
|
File size:
1.1 KB
|
Line | |
---|
1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | // Nombres aleatoires pour Peida.
|
---|
3 | // C. Magneville 1996-2000
|
---|
4 | // DAPNIA/SPP (Saclay) / CEA LAL - IN2P3/CNRS (Orsay)
|
---|
5 |
|
---|
6 | #ifndef PERANDOM_SEEN
|
---|
7 | #define PERANDOM_SEEN
|
---|
8 |
|
---|
9 | #include "machdefs.h"
|
---|
10 | #include <stdlib.h>
|
---|
11 | #include "histos.h"
|
---|
12 | #include "nbrandom.h"
|
---|
13 |
|
---|
14 | namespace SOPHYA {
|
---|
15 |
|
---|
16 | class FunRan : public Histo {
|
---|
17 | public:
|
---|
18 | typedef r_8 (*Func)(r_8);
|
---|
19 | FunRan(Func f, r_8 xMin=0.0, r_8 xMax=1.0, int_4 nBin=100);
|
---|
20 | FunRan(r_8 *tab, int_4 nBin);
|
---|
21 | FunRan(r_8 *tab, int_4 nBin, r_8 xMin, r_8 xMax);
|
---|
22 | void IFunRan(r_8 *tab, int_4 nBin);
|
---|
23 | r_8 Random(void);
|
---|
24 | int_4 BinRandom(void);
|
---|
25 | };
|
---|
26 |
|
---|
27 | class FunRan2D {
|
---|
28 | public:
|
---|
29 | // typedef r_8 (*Func)(r_8, r_8);
|
---|
30 | // FunRan2D(Func f, r_8 xMin=0.0, r_8 xMax=1.0, int_4 nBinX=100,
|
---|
31 | // r_8 yMin=0.0, r_8 yMax=1.0, int_4 nBinY=100);
|
---|
32 | FunRan2D(r_8 *tab, int_4 nBinX, int_4 nBinY);
|
---|
33 | FunRan2D(r_8 **tab, int_4 nBinX, int_4 nBinY);
|
---|
34 | ~FunRan2D();
|
---|
35 | void Random(r_8& x, r_8& y);
|
---|
36 | void BinRandom(int_4& x, int_4& y);
|
---|
37 | private:
|
---|
38 | FunRan* ranX;
|
---|
39 | FunRan** ranY;
|
---|
40 | int_4 nx;
|
---|
41 | };
|
---|
42 |
|
---|
43 | } // namespace SOPHYA
|
---|
44 |
|
---|
45 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.