Struct opencv::core::RNG_MT19937

source ·
pub struct RNG_MT19937 { /* private fields */ }
Expand description

Mersenne Twister random number generator

Inspired by http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c @todo document

Implementations§

Trait Implementations§

source§

impl Boxed for RNG_MT19937

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl Drop for RNG_MT19937

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl RNG_MT19937Trait for RNG_MT19937

source§

fn as_raw_mut_RNG_MT19937(&mut self) -> *mut c_void

source§

fn seed(&mut self, s: u32) -> Result<()>

source§

fn next(&mut self) -> Result<u32>

source§

fn to_i32(&mut self) -> Result<i32>

source§

fn to_u32(&mut self) -> Result<u32>

source§

fn to_f32(&mut self) -> Result<f32>

source§

fn to_f64(&mut self) -> Result<f64>

source§

fn apply(&mut self, n: u32) -> Result<u32>

source§

fn apply_1(&mut self) -> Result<u32>

source§

fn uniform(&mut self, a: i32, b: i32) -> Result<i32>

returns uniformly distributed integer random number from [a,b) range
source§

fn uniform_1(&mut self, a: f32, b: f32) -> Result<f32>

returns uniformly distributed floating-point random number from [a,b) range
source§

fn uniform_2(&mut self, a: f64, b: f64) -> Result<f64>

returns uniformly distributed double-precision floating-point random number from [a,b) range
source§

impl RNG_MT19937TraitConst for RNG_MT19937

source§

impl Send for RNG_MT19937

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.