PaGMO  1.1.5
Data Structures | Typedefs | Functions
pagmo::util::discrepancy Namespace Reference

Discrepancy namespace. More...

Data Structures

class  base
 Base low-discrepancy sequence class. More...
 
class  faure
 Faure quasi-random point sequence. More...
 
class  halton
 Halton quasi-random point sequence. More...
 
class  lhs
 Latin Hypercube Sampling. More...
 
class  simplex
 Halton sequence projected on a simplex. More...
 
class  sobol
 Sobol quasi-random point sequence. More...
 

Typedefs

typedef boost::shared_ptr< basebase_ptr
 Smart pointer to the base discrepancy class.
 

Functions

double van_der_corput (unsigned int n, unsigned int base)
 Van Der Corput sequence. More...
 
unsigned int prime (int n)
 Returns a prime number. More...
 
unsigned int prime_ge (unsigned int n)
 Returns the smallest prime greater than or equal to n. More...
 

Detailed Description

Discrepancy namespace.

Utilities to generate low-discrepancy sequences in the hypercube or on a simplex

See also
http://en.wikipedia.org/wiki/Quasi-Monte_Carlo_method

Function Documentation

unsigned int pagmo::util::discrepancy::prime ( int  n)

Returns a prime number.

Returns any of the first 1600 prime numbers.

Parameters
[in]nthe index of the desired prime number (0 is 1)
Exceptions
value_errorif n is larger than 1600 or smaller than 0

Definition at line 48 of file discrepancy.cpp.

unsigned int pagmo::util::discrepancy::prime_ge ( unsigned int  n)

Returns the smallest prime greater than or equal to n.

Returns the smallest prime greater than or equal to n

Parameters
[in]nthe number to be bounded.
Returns
the smallest prime greater than or equal to n.
Exceptions
value_errorif n is larger than 13499
Author
dario.nosp@m..izz.nosp@m.o@gma.nosp@m.il.c.nosp@m.om

Definition at line 233 of file discrepancy.cpp.

double pagmo::util::discrepancy::van_der_corput ( unsigned int  n,
unsigned int  base 
)

Van Der Corput sequence.

Returns the n-th number in the Halton sequence

Parameters
[in]nselects which number of the Halton sequence to return
[in]baseprime number to be used as a base of the sequence
Returns
the n-th number in the van_der_corput sequence
See also
http://en.wikipedia.org/wiki/Van_der_Corput_sequence

Definition at line 26 of file discrepancy.cpp.