Revision 3227,
600 bytes
checked in by mattausch, 16 years ago
(diff) |
worked on sampling / convergence
|
Line | |
---|
1 | #ifndef __HALTON_H
|
---|
2 | #define __HALTON_H
|
---|
3 |
|
---|
4 | #include <iostream>
|
---|
5 | #include <vector>
|
---|
6 |
|
---|
7 | class Halton
|
---|
8 | {
|
---|
9 | public:
|
---|
10 |
|
---|
11 | static void TestHalton(int n, int dim);
|
---|
12 |
|
---|
13 | static void TestPrime();
|
---|
14 |
|
---|
15 |
|
---|
16 | Halton(int dim);
|
---|
17 |
|
---|
18 |
|
---|
19 | float GetNext();
|
---|
20 |
|
---|
21 |
|
---|
22 | protected:
|
---|
23 |
|
---|
24 | static bool IsPrime(int n);
|
---|
25 |
|
---|
26 | static int FindPrime(int idx);
|
---|
27 |
|
---|
28 |
|
---|
29 | ////////////////////
|
---|
30 |
|
---|
31 | unsigned int mIndex;
|
---|
32 | int mBase;
|
---|
33 | };
|
---|
34 |
|
---|
35 |
|
---|
36 | class HaltonSequence
|
---|
37 | {
|
---|
38 | public:
|
---|
39 |
|
---|
40 | static void TestHalton(int n, int dim);
|
---|
41 |
|
---|
42 | HaltonSequence(int dim);
|
---|
43 |
|
---|
44 | void GetNext(float *numbers);
|
---|
45 |
|
---|
46 |
|
---|
47 | protected:
|
---|
48 |
|
---|
49 | std::vector<Halton> mHaltons;
|
---|
50 | };
|
---|
51 |
|
---|
52 |
|
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.