pub struct QRng { /* private fields */ }Implementations
sourceimpl QRng
impl QRng
sourcepub fn new(t: QRngType, d: u32) -> Option<Self>
pub fn new(t: QRngType, d: u32) -> Option<Self>
This function returns a pointer to a newly-created instance of a quasi-random sequence
generator of type T and dimension d. If there is insufficient memory to create the generator
then the function returns a null pointer and the error handler is invoked with an error code
of Value::NoMemory.
sourcepub fn init(&mut self)
pub fn init(&mut self)
This function reinitializes the generator self to its starting point. Note that quasi-random sequences do not use a seed and always produce the same set of values.
sourcepub fn get(&self, x: &mut [f64]) -> Value
pub fn get(&self, x: &mut [f64]) -> Value
This function stores the next point from the sequence generator self in the array x. The space available for x must match the dimension of the generator. The point x will lie in the range 0 < x_i < 1 for each x_i.
sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
This function returns a pointer to the name of the generator.
sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
These functions return a pointer to the state of generator r and its size.
sourcepub fn state(&mut self) -> Option<&[i8]>
pub fn state(&mut self) -> Option<&[i8]>
This function returns a pointer to the state of generator self.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for QRng
impl !Send for QRng
impl !Sync for QRng
impl Unpin for QRng
impl UnwindSafe for QRng
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more