Last change
on this file since 1092 was 1092, checked in by ansari, 25 years ago |
Histos/Hprof/Histo2D en r_8 cmv 26/7/00
|
File size:
973 bytes
|
Line | |
---|
1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 |
|
---|
3 | // Nombres aleatoires pour Peida.
|
---|
4 |
|
---|
5 | #ifndef PERANDOM_SEEN
|
---|
6 | #define PERANDOM_SEEN
|
---|
7 |
|
---|
8 | #include "machdefs.h"
|
---|
9 | #include <stdlib.h>
|
---|
10 | #include "histos.h"
|
---|
11 | #include "nbrandom.h"
|
---|
12 |
|
---|
13 | class FunRan : public Histo {
|
---|
14 | public:
|
---|
15 | typedef r_8 (*Func)(r_8);
|
---|
16 | FunRan(Func f, r_8 xMin=0.0, r_8 xMax=1.0, int_4 nBin=100);
|
---|
17 | FunRan(r_8 *tab, int_4 nBin);
|
---|
18 | FunRan(r_8 *tab, int_4 nBin, r_8 xMin, r_8 xMax);
|
---|
19 | void IFunRan(r_8 *tab, int_4 nBin);
|
---|
20 | r_8 Random(void);
|
---|
21 | int_4 BinRandom(void);
|
---|
22 | };
|
---|
23 |
|
---|
24 | class FunRan2D EXC_AWARE {
|
---|
25 | public:
|
---|
26 | // typedef r_8 (*Func)(r_8, r_8);
|
---|
27 | // FunRan2D(Func f, r_8 xMin=0.0, r_8 xMax=1.0, int_4 nBinX=100,
|
---|
28 | // r_8 yMin=0.0, r_8 yMax=1.0, int_4 nBinY=100);
|
---|
29 | FunRan2D(r_8 *tab, int_4 nBinX, int_4 nBinY);
|
---|
30 | FunRan2D(r_8 **tab, int_4 nBinX, int_4 nBinY);
|
---|
31 | ~FunRan2D();
|
---|
32 | void Random(r_8& x, r_8& y);
|
---|
33 | void BinRandom(int_4& x, int_4& y);
|
---|
34 | private:
|
---|
35 | FunRan* ranX;
|
---|
36 | FunRan** ranY;
|
---|
37 | int_4 nx;
|
---|
38 | };
|
---|
39 |
|
---|
40 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.