• Home
  • Raw
  • Download

Lines Matching refs:high

180     pub fn new<B1, B2>(low: B1, high: B2) -> Uniform<X>  in new()
185 Uniform(X::Sampler::new(low, high)) in new()
190 pub fn new_inclusive<B1, B2>(low: B1, high: B2) -> Uniform<X> in new_inclusive()
195 Uniform(X::Sampler::new_inclusive(low, high)) in new_inclusive()
236 fn new<B1, B2>(low: B1, high: B2) -> Self in new()
246 fn new_inclusive<B1, B2>(low: B1, high: B2) -> Self in new_inclusive()
273 fn sample_single<R: Rng + ?Sized, B1, B2>(low: B1, high: B2, rng: &mut R) -> Self::X in sample_single()
278 let uniform: Self = UniformSampler::new(low, high); in sample_single()
290 fn sample_single_inclusive<R: Rng + ?Sized, B1, B2>(low: B1, high: B2, rng: &mut R) in sample_single_inclusive()
295 let uniform: Self = UniformSampler::new_inclusive(low, high); in sample_single_inclusive()
447 let high = *high_b.borrow(); localVariable
448 assert!(low < high, "Uniform::new called with `low >= high`");
449 UniformSampler::new_inclusive(low, high - 1)
460 let high = *high_b.borrow(); localVariable
462 low <= high,
467 let range = high.wrapping_sub(low).wrapping_add(1) as $unsigned;
509 let high = *high_b.borrow(); localVariable
510 assert!(low < high, "UniformSampler::sample_single: low >= high");
511 Self::sample_single_inclusive(low, high - 1, rng)
521 let high = *high_b.borrow(); localVariable
522 assert!(low <= high, "UniformSampler::sample_single_inclusive: low > high");
523 let range = high.wrapping_sub(low).wrapping_add(1) as $unsigned as $u_large;
595 let high = *high_b.borrow(); localVariable
596 assert!(low.lt(high).all(), "Uniform::new called with `low >= high`");
597 UniformSampler::new_inclusive(low, high - 1)
607 let high = *high_b.borrow(); localVariable
608 assert!(low.le(high).all(),
614 let range: $unsigned = ((high - low) + 1).cast();
758 let high = char_to_comp_u32(*high_b.borrow()); in new() localVariable
759 let sampler = UniformInt::<u32>::new(low, high); in new()
771 let high = char_to_comp_u32(*high_b.borrow()); in new_inclusive() localVariable
772 let sampler = UniformInt::<u32>::new_inclusive(low, high); in new_inclusive()
829 let high = *high_b.borrow(); localVariable
830 assert!(low.all_lt(high), "Uniform::new called with `low >= high`");
832 low.all_finite() && high.all_finite(),
839 let mut scale = high - low;
842 let mask = (scale * max_rand + low).ge_mask(high);
860 let high = *high_b.borrow(); localVariable
862 low.all_le(high),
866 low.all_finite() && high.all_finite(),
873 let mut scale = (high - low) / max_rand;
876 let mask = (scale * max_rand + low).gt_mask(high);
911 let high = *high_b.borrow(); localVariable
913 low.all_lt(high),
916 let mut scale = high - low;
932 if res.all_lt(high) {
966 low.all_finite() && high.all_finite(),
1039 let high = *high_b.borrow(); in new() localVariable
1040 assert!(low < high, "Uniform::new called with `low >= high`"); in new()
1041 UniformDuration::new_inclusive(low, high - Duration::new(0, 1)) in new()
1051 let high = *high_b.borrow(); in new_inclusive() localVariable
1053 low <= high, in new_inclusive()
1059 let mut high_s = high.as_secs(); in new_inclusive()
1060 let mut high_n = high.subsec_nanos(); in new_inclusive()
1215 for &(low, high) in $v.iter() { in test_integers()
1216 let my_uniform = Uniform::new(low, high); in test_integers()
1219 assert!($le(low, v) && $lt(v, high)); in test_integers()
1222 let my_uniform = Uniform::new_inclusive(low, high); in test_integers()
1225 assert!($le(low, v) && $le(v, high)); in test_integers()
1228 let my_uniform = Uniform::new(&low, high); in test_integers()
1231 assert!($le(low, v) && $lt(v, high)); in test_integers()
1234 let my_uniform = Uniform::new_inclusive(&low, &high); in test_integers()
1237 assert!($le(low, v) && $le(v, high)); in test_integers()
1241 let v = <$ty as SampleUniform>::Sampler::sample_single(low, high, &mut rng); in test_integers()
1242 assert!($le(low, v) && $lt(v, high)); in test_integers()
1246 … let v = <$ty as SampleUniform>::Sampler::sample_single_inclusive(low, high, &mut rng); in test_integers()
1247 assert!($le(low, v) && $le(v, high)); in test_integers()
1341 let high = <$ty>::splat(1.0 as $f_scalar).replace(lane, high_scalar); in test_floats() localVariable
1342 let my_uniform = Uniform::new(low, high); in test_floats()
1343 let my_incl_uniform = Uniform::new_inclusive(low, high); in test_floats()
1350 ::sample_single(low, high, &mut rng).extract(lane); in test_floats()
1362 ::sample_single(low, high, &mut zero_rng) in test_floats()
1377 ::sample_single(low, high, &mut lowering_max_rng) in test_floats()
1424 fn range<T: SampleUniform>(low: T, high: T) { in test_float_assertions()
1426 T::Sampler::sample_single(low, high, &mut rng); in test_float_assertions()
1451 let high = <$ty>::splat(1.0 as $f_scalar).replace(lane, high_scalar); in test_float_assertions() localVariable
1452 assert!(catch_unwind(|| range(low, high)).is_err()); in test_float_assertions()
1453 assert!(catch_unwind(|| Uniform::new(low, high)).is_err()); in test_float_assertions()
1454 assert!(catch_unwind(|| Uniform::new_inclusive(low, high)).is_err()); in test_float_assertions()
1493 for &(low, high) in v.iter() { in test_durations()
1494 let my_uniform = Uniform::new(low, high); in test_durations()
1497 assert!(low <= v && v < high); in test_durations()
1516 fn new<B1, B2>(low: B1, high: B2) -> Self in test_custom_uniform()
1521 UniformMyF32(UniformFloat::<f32>::new(low.borrow().x, high.borrow().x)) in test_custom_uniform()
1524 fn new_inclusive<B1, B2>(low: B1, high: B2) -> Self in test_custom_uniform()
1529 UniformSampler::new(low, high) in test_custom_uniform()
1542 let (low, high) = (MyF32 { x: 17.0f32 }, MyF32 { x: 22.0f32 }); in test_custom_uniform()
1543 let uniform = Uniform::new(low, high); in test_custom_uniform()
1547 assert!(low <= x && x < high); in test_custom_uniform()