27 : dimensionality_(dimensionality),
29 sequence_(
std::vector<
Real> (dimensionality), 1.0),
30 integerSequence_(dimensionality, 0) {
33 "dimensionality must be greater than 0");
44 mbit_=(
Size)(std::log((
double)std::numeric_limits<long int>::max())/
45 std::log((
double)
base_));
47 std::vector<long int>(
mbit_+1, 0));
53 std::vector<long int>(2*
base_-1, 0));
55 for (
int i2=
mbit_-2; i2>=0; --i2)
57 for (
int ii=0; ii<(int)
mbit_; ii++) {
60 for (
int j2=
base_-1; j2>=0; --j2)
65 for (j=0; j<
base_ ; j++)
70 for (k=0; k<
mbit_; k++) {
72 std::vector<long int>(k+1, 0));
80 for (k=2; k<
mbit_ ; k++) {
81 for (i=1; i<k ; i++) {
88 long int fact = 1, diag;
90 for (
long int kk=
mbit_-1; kk>=0 ; --kk) {
91 diag =
mbit_ - kk - 1;
95 fact = (fact*j) %
base_;
96 for (
long int ii=0; ii<=kk; ii++)
114 while (
bary_[bit] == 0) {
119 "Error processing Faure sequence." );
121 long int tmp, g1, g2;
123 for (
Size j=0; j<=bit ; j++) {
127 g2 =
base_ - 1 + g1 - tmp;
double normalizationFactor_
std::vector< std::vector< long int > > gray_
FaureRsg(Size dimensionality)
std::vector< long int > addOne_
std::vector< long int > integerSequence_
std::vector< std::vector< long int > > powBase_
std::vector< std::vector< std::vector< long int > > > pascal3D
void generateNextIntSequence() const
std::vector< long int > bary_
static BigNatural get(Size absoluteIndex)
Get and store one after another.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
Faure low-discrepancy sequence generator.
std::size_t Size
size of a container