Quiery one not-configurable field.
value = lowdisc_get (this,key)
the current object
a string. The name of the option to get. The available options are presented below.
the value associated with the key.
Returns the option of the given key. The following keys are available.
"-index"
: a positive floating point integer,
the number of points which have already been generated in the sequence.
When a sequence is created, then index is set to 0.
Whenever the lowdisc_next
function is called, the index
is updated and incremented with 1.
If this option is set, the algorithm directly goes to the required
location in the sequence.
"-dimmax"
: a floating point integer,
the largest dimension available for the sequence.
"-speed"
: a string,
the speed of the sequence.
The speed
field can be equal to "slow" or "fast".
"-nbsimmax"
: a floating point integer,
the largest number of elements available for the sequence.
For the "faure" sequence (fast Faure sequence), the following field is available.
"-faureprime"
: a floating point integer,
the prime integer used in the Faure fast sequence.
This prime number is computed depending on the dimension of
the sequence: this is the smallest prime number larger than
the dimension.
This prime number is used as the base of the Faure sequence.
// Faure sequence: get the base associated with current dimension. // See the -skip option in action in the Faure fast sequence. lds = lowdisc_new("faure"); lds = lowdisc_configure(lds,"-dimension",4); // Skip qs^4 - 1 terms, as in TOMS implementation qs = lowdisc_get ( lds , "-faureprime" ); lds = lowdisc_configure(lds,"-skip", qs^4 - 2); lds lds = lowdisc_startup (lds); [lds,computed]=lowdisc_next(lds); // Terms #1 to #100 [lds,computed]=lowdisc_next(lds,100); for i = 1:100 mprintf ("%8d %14.6f %14.6f %14.6f %14.6f\n", ... i , computed(i,1) , computed(i,2) , computed(i,3) , computed(i,4) ) end i = lowdisc_get(lds,"-index") lds = lowdisc_destroy(lds); | ![]() | ![]() |