<< Projections Low Discrepancy Sequences >>

Low Discrepancy >> Low Discrepancy > lowdisc_ldgen

lowdisc_ldgen

Returns uniform numbers from a low discrepancy sequence.

Calling Sequence

[ evalf , u ] = lowdisc_ldgen ( callf , n )
[ evalf , u ] = lowdisc_ldgen ( callf , n , ldseq )
[ evalf , u ] = lowdisc_ldgen ( callf , n , ldseq , strict )

Parameters

callf :

a 1-by-1 matrix of floating point integers, the number of calls to the function.

n:

a 1-by-1 matrix of floating point integers, the spatial dimension.

ldseq :

a 1-by-1 matrix of strings, the name of the sequence. (default ldseq = "sobolf"). The method can be equal to : "halton", "haltonf", "faure", "fauref", "reversehalton", "reversehaltonf", "sobol", "sobolf", "niederreiter-base-2", "niederreiterf". See below for details.

strict :

a 1-by-1 matrix of boolean, set to %t to make so that evalf==callf. (default = %f)

evalf :

a 1-by-1 matrix of floating point integers, the actual number of function evaluations. We have evalf >= callf.

u :

a evalf-by-n matrix of doubles, the uniform random numbers in [0,1]^n.

Description

In dimension n, generate more than callf experiments with low discrepancy sequence ldseq.

Returns the number of suggested function evaluations evalf and the uniform numbers u in [0,1]^n.

If strict is false, then the optimum number of simulations evalf is used. If strict is true, the number of simulations is equal to the required one, that is, we have evalf == callf. In general, using strict=%f (i.e. the default) may produce a set of points with a lower discrepancy, that is, with greater quality. On the other hand, the value of evalf may be much larger than the value of callf, so that, in practice, it may be necessary to use strict=%t.

The sequences which are available are described in depth in the lowdisc_new function.

Examples

// Generate more than 20 points from a
// fast Sobol sequence in dimension 4
[ evalf , u ] = lowdisc_ldgen ( 20 , 4 )

// Generate more than 20 points from a
// fast Halton sequence in dimension 4
callf = 20;
n = 4;
ldseq = "haltonf";
[ evalf , u ] = lowdisc_ldgen ( callf , n , ldseq )

// Generate the suggested number of points
// from the fast Faure sequence.
[ evalf , u ] = lowdisc_ldgen ( 20 , 4 , "fauref" )
// Generate exactly 20 points (this is not
// recommended, it may increase the discrepancy).
[ evalf , u ] = lowdisc_ldgen ( 20 , 4 , "fauref" , %t )

Authors


<< Projections Low Discrepancy Sequences >>