Configure a field of the object and returns the modified object.
this = lowdisc_configure (this,key,value)
the current object
a string. The name of the option to get. All options which can be set with lowdisc_configure can be get with lowdisc_cget.
the value associated with the key. Its type depends on the value of the key.
This command allows to configure the state of the current object. It requires to take the current object both as an input and output argument.
The following keys are available: "-dimension"
, "-index"
,
"-skip"
, "-leap"
, "-verbose"
.
"-dimension"
: a positive floating point integer,
the dimension of the space, i.e.
the size of the vector returned by the command lowdisc_next (default = 1).
"-skip"
: a positive floating point integer,
the number of terms to skip at startup.
When the sequence is started up with the lowdisc_startup method,
then skip elements are ignored in the sequence, so that the
next point will be generated at index skip+1
.
For example, Fox recommends to skip the qs^4 - 2
first terms in the
Faure sequence, where qs is the prime number associated with the
sequence. This number can be retrieved with
qs=lowdisc_get(lds,"-faureprime")
.
"-leap"
: a positive floating point integer,
the number of elements to ignore from element to element (default = 0).
Each time the lowdisc_next function is called, the immediate element
is retrieved. Then, in order to prepare for the next call,
there are leap elements which are generated and immediately
discarded. This option allows to generate alternative
sequences based on the same basic generator.
"-verbose"
: a boolean, the verbose mode (default : %f).
Some sequences can be configured in order to increase their maximum dimension. These sequences accept the following "-primeslist" option.
"-primeslist"
: a 1-by-n array of positive floating point integers,
where n is greater than 2,
a matrix of prime numbers used in several low discrepancy sequences.
The default value is made of the 100 first prime numbers, from 2 to 541, which
enables the user to generate sequences up to 100 dimensions.
If a larger dimension problem is to manage, the -primeslist option enables users to
customize the list to meet the required dimension.
The user should be warned that the Halton sequence may produce poor convergence
rate if the dimension is larger than 15.
For the "niederreiterf" sequence (Fast Niederreiter sequence in arbitrary base), we can configure the base as following.
"-base"
: a floating point number, greater than 2.
The base can be an odd or even integer.
The default value is 2.
It may be the smallest prime larger than the dimension as in the
Faure sequence, although it does not guarantee that this
leads to a lower discrepancy.
See the lowdisc_niedersuggest
function for a suggestion of the optimal
base, depending on the dimension.
Some expertise is required to configure the skip
and leap
options.
The skip
option can improve the Faure, Sobol and Niederreiter sequences.
The leap
option can improve the Halton sequence, although
Kocis and Whiten also tried to leap the Faure and Sobol sequences.
This can lead to some trouble for non-experts.
For that purpose, we designed the following functions.
lowdisc_haltonsuggest
: provides settings for the Halton sequence,
lowdisc_fauresuggest
: provides settings for the Faure sequence,
lowdisc_sobolsuggest
: provides settings for the Sobol sequence,
lowdisc_niedersuggest
: provides settings for the Niederreiter sequence.
Some sequences are limited in the maximum number of dimensions,
because they use internally fixed tables of parameters (e.g. the Sobol
sequence).
Some other sequences can be extended with the "-primeslist"
option.
The "-primeslist"
option can be configure with a table of
primes computed with the number_primes100()
, number_primes1000()
or number_primes10000()
functions. The maximum dimension
which can be attained with these tables depends on the sequence.
See the specific settings of each sequence below for detail.