Last change
on this file since 690 was 244, checked in by ansari, 26 years ago |
beaucoup modifs rz+cmv 22/4/99
|
File size:
1000 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 double (*Func)(double);
|
---|
16 | FunRan(Func f, float xMin=0.0, float xMax=1.0, int nBin=100);
|
---|
17 | FunRan(double *tab, int nBin);
|
---|
18 | FunRan(double *tab, int nBin, float xMin, float xMax);
|
---|
19 | void IFunRan(double *tab, int nBin);
|
---|
20 | double Random(void);
|
---|
21 | int BinRandom(void);
|
---|
22 | };
|
---|
23 |
|
---|
24 | class FunRan2D EXC_AWARE {
|
---|
25 | public:
|
---|
26 | // typedef double (*Func)(double, double);
|
---|
27 | // FunRan2D(Func f, float xMin=0.0, float xMax=1.0, int nBinX=100,
|
---|
28 | // float yMin=0.0, float yMax=1.0, int nBinY=100);
|
---|
29 | FunRan2D(double *tab, int nBinX, int nBinY);
|
---|
30 | FunRan2D(double **tab, int nBinX, int nBinY);
|
---|
31 | ~FunRan2D();
|
---|
32 | void Random(double& x, double& y);
|
---|
33 | void BinRandom(int& x, int& y);
|
---|
34 | private:
|
---|
35 | FunRan* ranX;
|
---|
36 | FunRan** ranY;
|
---|
37 | int nx;
|
---|
38 | };
|
---|
39 |
|
---|
40 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.