pub struct HaltonSequence { /* private fields */ }Expand description
The Halton sequence: coordinate k is the radical inverse in the k-th prime base. Simple and
extensible to any number of points; uniformity degrades in high dimensions (large bases), where
Sobol is preferable. Supports up to 100 dimensions. Starts at index 1 (skipping the origin).
Implementations§
Source§impl HaltonSequence
impl HaltonSequence
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 Halton sequence (SciPy’s Halton(d, scramble=True)): in coordinate k, digit
position j of every index is mapped through one random permutation π_{k,j} of the
digits 0..b, over as many positions as a double resolves. Unlike the plain sequence it
starts at index 0, and the permutations break up the correlations between large bases.
pub fn dimension(&self) -> usize
pub fn next_point(&mut self) -> Vec<f64>
pub fn skip(&mut self, count: u64)
Trait Implementations§
Source§impl Clone for HaltonSequence
impl Clone for HaltonSequence
Auto Trait Implementations§
impl Freeze for HaltonSequence
impl RefUnwindSafe for HaltonSequence
impl Send for HaltonSequence
impl Sync for HaltonSequence
impl Unpin for HaltonSequence
impl UnsafeUnpin for HaltonSequence
impl UnwindSafe for HaltonSequence
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