Struct prop_check_rs::rng::RNG
source · pub struct RNG { /* private fields */ }Expand description
RNG is a random number generator.
RNGは乱数生成器です。
Implementations§
source§impl RNG
impl RNG
sourcepub fn with_seed(self, seed: u64) -> Self
pub fn with_seed(self, seed: u64) -> Self
new_with_seed is a constructor with seed.
new_with_seedはシード値を指定するファクトリです。
sourcepub fn i32_f32(&self) -> ((i32, f32), Self)
pub fn i32_f32(&self) -> ((i32, f32), Self)
i32_f32 generates a tuple of i32 and f32.
i32_f32はi32とf32のタプルを生成します。
sourcepub fn f32_i32(&self) -> ((f32, i32), Self)
pub fn f32_i32(&self) -> ((f32, i32), Self)
f32_i32 generates a tuple of f32 and i32.
f32_i32はf32とi32のタプルを生成します。
sourcepub fn f32_3(&self) -> ((f32, f32, f32), Self)
pub fn f32_3(&self) -> ((f32, f32, f32), Self)
f32_3 generates a tuple of f32, f32 and f32.
f32_3はf32とf32とf32のタプルを生成します。
sourcepub fn i32s(self, count: u32) -> (Vec<i32>, Self)
pub fn i32s(self, count: u32) -> (Vec<i32>, Self)
f32s generates a vector of f32.
f32sはf32のベクタを生成します。
sourcepub fn unit<A>(a: A) -> Box<dyn FnMut(RNG) -> (A, RNG)>where
A: Clone + 'static,
pub fn unit<A>(a: A) -> Box<dyn FnMut(RNG) -> (A, RNG)>where
A: Clone + 'static,
unit generates a function that returns a tuple of A and RNG.
unitはAとRNGのタプルを返す関数を生成します。
sourcepub fn sequence<A, F>(fs: Vec<F>) -> Box<dyn FnMut(RNG) -> (Vec<A>, RNG)>
pub fn sequence<A, F>(fs: Vec<F>) -> Box<dyn FnMut(RNG) -> (Vec<A>, RNG)>
sequence generates a function that returns a tuple of Vec<A> and RNG.
sequenceはVec<A>とRNGのタプルを返す関数を生成します。
sourcepub fn int_value() -> Box<dyn FnMut(RNG) -> (i32, RNG)>
pub fn int_value() -> Box<dyn FnMut(RNG) -> (i32, RNG)>
int_value generates a function that returns a tuple of i32 and RNG.
int_valueはi32とRNGのタプルを返す関数を生成します。
sourcepub fn double_value() -> Box<dyn FnMut(RNG) -> (f32, RNG)>
pub fn double_value() -> Box<dyn FnMut(RNG) -> (f32, RNG)>
double_value generates a function that returns a tuple of f32 and RNG.
double_valueはf32とRNGのタプルを返す関数を生成します。
sourcepub fn map<A, B, F1, F2>(s: F1, f: F2) -> Box<dyn FnMut(RNG) -> (B, RNG)>
pub fn map<A, B, F1, F2>(s: F1, f: F2) -> Box<dyn FnMut(RNG) -> (B, RNG)>
map generates a function that returns a tuple of B and RNG.
mapはBとRNGのタプルを返す関数を生成します。
sourcepub fn map2<F1, F2, F3, A, B, C>(
ra: F1,
rb: F2,
f: F3
) -> Box<dyn FnMut(RNG) -> (C, RNG)>
pub fn map2<F1, F2, F3, A, B, C>( ra: F1, rb: F2, f: F3 ) -> Box<dyn FnMut(RNG) -> (C, RNG)>
map2 generates a function that returns a tuple of C and RNG.
map2はCとRNGのタプルを返す関数を生成します。
sourcepub fn both<F1, F2, A, B>(
ra: F1,
rb: F2
) -> Box<dyn FnMut(RNG) -> ((A, B), RNG)>
pub fn both<F1, F2, A, B>( ra: F1, rb: F2 ) -> Box<dyn FnMut(RNG) -> ((A, B), RNG)>
both generates a function that returns a tuple of (A, B) and RNG.
bothは(A, B)とRNGのタプルを返す関数を生成します。
sourcepub fn rand_int_double() -> Box<dyn FnMut(RNG) -> ((i32, f32), RNG)>
pub fn rand_int_double() -> Box<dyn FnMut(RNG) -> ((i32, f32), RNG)>
rand_int_double generates a function that returns a tuple of (i32, f32) and RNG.
rand_int_doubleは(i32, f32)とRNGのタプルを返す関数を生成します。
Trait Implementations§
source§impl NextRandValue for RNG
impl NextRandValue for RNG
source§fn next_i64(&self) -> (i64, Self)
fn next_i64(&self) -> (i64, Self)
next_i64 generates a tuple of i64 and Self.next_i64はi64とSelfのタプルを生成します。source§fn next_u64(&self) -> (u64, Self)
fn next_u64(&self) -> (u64, Self)
next_u64 generates a tuple of u64 and Self.next_u64はu64とSelfのタプルを生成します。source§fn next_i32(&self) -> (i32, Self)
fn next_i32(&self) -> (i32, Self)
next_i32 generates a tuple of i32 and Self.next_i32はi32とSelfのタプルを生成します。source§fn next_u32(&self) -> (u32, Self)
fn next_u32(&self) -> (u32, Self)
next_u32 generates a tuple of u32 and Self.next_u32はu32とSelfのタプルを生成します。source§fn next_i16(&self) -> (i16, Self)
fn next_i16(&self) -> (i16, Self)
next_i16 generates a tuple of i16 and Self.next_i16はi16とSelfのタプルを生成します。source§fn next_u16(&self) -> (u16, Self)
fn next_u16(&self) -> (u16, Self)
next_u16 generates a tuple of u16 and Self.next_u16はu16とSelfのタプルを生成します。source§fn next_i8(&self) -> (i8, Self)
fn next_i8(&self) -> (i8, Self)
next_i8 generates a tuple of i8 and Self.next_i8はi8とSelfのタプルを生成します。source§fn next_u8(&self) -> (u8, Self)
fn next_u8(&self) -> (u8, Self)
next_u8 generates a tuple of u8 and Self.next_u8はu8とSelfのタプルを生成します。source§fn next_f64(&self) -> (f64, Self)
fn next_f64(&self) -> (f64, Self)
next_f64 generates a tuple of f64 and Self.next_f64はf64とSelfのタプルを生成します。