pub struct SobolSequence { /* private fields */ }Expand description
The Sobol sequence in up to 21201 dimensions (Joe-Kuo direction numbers), generated in Gray-code
order (Antonov and Saleev), one XOR per coordinate per point. The first point is the origin;
every block of 2^k consecutive points starting at a multiple of 2^k is a (t, k, d)-net.
Implementations§
Source§impl SobolSequence
impl SobolSequence
Sourcepub const MAX_DIMENSION: usize = 21201
pub const MAX_DIMENSION: usize = 21201
The largest supported dimension.
pub fn new(dimension: usize) -> Result<Self, ErrorsJSL>
Sourcepub fn scrambled<G: UniformGenerator>(
dimension: usize,
rng: &mut G,
) -> Result<Self, ErrorsJSL>
pub fn scrambled<G: UniformGenerator>( dimension: usize, rng: &mut G, ) -> Result<Self, ErrorsJSL>
A scrambled Sobol sequence (SciPy’s default, Sobol(d, scramble=True)): Matoušek’s linear
matrix scrambling of each coordinate’s direction numbers by a random lower triangular
binary matrix with unit diagonal, then a random digital shift (XOR). The points remain a
(t, m, d)-net in every block of 2^m, but are no longer biased towards the origin, and
independent scramblings give independent, unbiased estimates.
pub fn dimension(&self) -> usize
Sourcepub fn next_point(&mut self) -> Vec<f64>
pub fn next_point(&mut self) -> Vec<f64>
The next point in [0, 1)^d.
Trait Implementations§
Source§impl Clone for SobolSequence
impl Clone for SobolSequence
Auto Trait Implementations§
impl Freeze for SobolSequence
impl RefUnwindSafe for SobolSequence
impl Send for SobolSequence
impl Sync for SobolSequence
impl Unpin for SobolSequence
impl UnsafeUnpin for SobolSequence
impl UnwindSafe for SobolSequence
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more