Lines Matching refs:RandomState
69 pub struct RandomState { struct
76 impl fmt::Debug for RandomState { argument
82 impl RandomState { impl
85 pub fn new() -> RandomState { in new()
89 RandomState::from_keys(seeds[0], seeds[1]) in new()
93 RandomState::from_keys( in new()
100 RandomState::from_keys(PI, PI2) in new()
107 pub fn generate_with(k0: u64, k1: u64, k2: u64, k3: u64) -> RandomState { in generate_with() argument
108 RandomState::from_keys(seeds(), [k0, k1, k2, k3]) in generate_with()
111 fn from_keys(a: [u64; 4], b: [u64; 4]) -> RandomState { in from_keys() argument
113 let mut hasher = AHasher::from_random_state(&RandomState { k0, k1, k2, k3 });
135 RandomState { k0: mix(b[0]), k1: mix(b[1]), k2: mix(b[2]), k3: mix(b[3]) }
140 pub(crate) fn with_fixed_keys() -> RandomState { in with_fixed_keys()
142 RandomState { k0, k1, k2, k3 } in with_fixed_keys()
147 pub const fn with_seeds(k0: u64, k1: u64, k2: u64, k3: u64) -> RandomState { in with_seeds() argument
148 RandomState { k0, k1, k2, k3 } in with_seeds()
152 impl Default for RandomState { implementation
159 impl BuildHasher for RandomState { implementation
202 let a = RandomState::new(); in test_unique()
203 let b = RandomState::new(); in test_unique()
227 const _CONST_RANDOM_STATE: RandomState = RandomState::with_seeds(17, 19, 21, 23); in test_with_seeds_const()