Struct rgsl::types::qrng::QRng [] [src]

pub struct QRng {
    // some fields omitted
}

Methods

impl QRng
[src]

fn new(t: &QRngType, d: u32) -> Option<QRng>

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 ::NoMem.

fn init(&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.

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.

fn name(&self) -> Option<String>

This function returns a pointer to the name of the generator.

fn size(&self) -> usize

These functions return a pointer to the state of generator r and its size.

fn state<'r>(&'r mut self) -> &'r mut [i8]

These functions return a pointer to the state of generator r and its size.

fn copy(&self, dest: &QRng) -> Value

This function copies the quasi-random sequence generator src into the pre-existing generator dest, making dest into an exact copy of src. The two generators must be of the same type.

Trait Implementations

impl Clone for QRng
[src]

fn clone(&self) -> QRng

This function returns a pointer to a newly created generator which is an exact copy of the generator self.

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Drop for QRng
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more