[][src]Struct sobol::Sobol

pub struct Sobol<T: SobolType> {
    pub dims: usize,
    pub resolution: usize,
    pub count: T::IT,
    pub max_len: T::IT,
    // some fields omitted
}

A low-discrepancy Sobol sequence generator

Fields

dims: usizeresolution: usizecount: T::ITmax_len: T::IT

Implementations

impl<T: SobolType> Sobol<T>[src]

pub fn new<P>(dims: usize, params: &dyn SobolParams<P>) -> Self where
    T::IT: LossyFrom<P>, 
[src]

Constructs a new sequence

pub fn new_with_resolution<P>(
    dims: usize,
    params: &dyn SobolParams<P>,
    resolution: Option<usize>
) -> Self where
    T::IT: LossyFrom<P>, 
[src]

Constructs a new sequence of given resolution. Resolution is the number of bits used in the computation of the sequence and by default is the size of the underlying type. This constructor is useful for reducing the number of cycles necessary to generate each point when the length of the sequence is not expected to approach it's theorectical maximum (2^res).

pub fn init_direction_vals<P>(
    dims: usize,
    resolution: usize,
    params: &dyn SobolParams<P>
) -> Vec<Vec<T::IT>> where
    T::IT: LossyFrom<P>, 
[src]

Initializes per-dimension direction values given sequence parameters

pub fn rightmost_zero(n: T::IT) -> usize[src]

Returns zero-based index of the rightmost binary zero. Used for the Gray code optimization

Trait Implementations

impl<T: Clone + SobolType> Clone for Sobol<T> where
    T::IT: Clone,
    T::IT: Clone,
    T::IT: Clone,
    T::IT: Clone
[src]

impl<T: SobolType> Iterator for Sobol<T>[src]

type Item = Vec<T>

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> RefUnwindSafe for Sobol<T> where
    <T as SobolType>::IT: RefUnwindSafe
[src]

impl<T> Send for Sobol<T> where
    <T as SobolType>::IT: Send
[src]

impl<T> Sync for Sobol<T> where
    <T as SobolType>::IT: Sync
[src]

impl<T> Unpin for Sobol<T> where
    <T as SobolType>::IT: Unpin
[src]

impl<T> UnwindSafe for Sobol<T> where
    <T as SobolType>::IT: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> LossyFrom<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.