Home
last modified time | relevance | path

Searched refs:distr (Results 1 – 16 of 16) sorted by relevance

/external/rust/crates/rand/src/distributions/
Dweighted_index.rs124 let distr = X::Sampler::new(zero, total_weight.clone()); in new() localVariable
129 weight_distribution: distr, in new()
308 let distr = WeightedIndex::new(weights.to_vec()).unwrap(); in test_weightedindex() localVariable
310 chosen[distr.sample(&mut r)] += 1; in test_weightedindex()
316 let distr = WeightedIndex::new(&weights[..]).unwrap(); in test_weightedindex() localVariable
318 chosen[distr.sample(&mut r)] += 1; in test_weightedindex()
324 let distr = WeightedIndex::new(weights.iter()).unwrap(); in test_weightedindex() localVariable
326 chosen[distr.sample(&mut r)] += 1; in test_weightedindex()
380 let mut distr = WeightedIndex::new(weights.to_vec()).unwrap(); in test_update_weights() localVariable
381 assert_eq!(distr.total_weight, total_weight); in test_update_weights()
[all …]
Dmod.rs190 distr: self, in sample_iter()
213 distr: D, field
230 Some(self.distr.sample(&mut self.rng)) in next()
344 let distr = Open01; in test_distributions_iter() localVariable
345 let mut iter = Distribution::<f32>::sample_iter(distr, &mut rng); in test_distributions_iter()
Dbernoulli.rs202 let distr = Bernoulli::new(0.4532).unwrap(); in value_stability() localVariable
205 *x = rng.sample(&distr); in value_stability()
Dother.rs253 distr: &D, zero: T, expected: &[T], in value_stability()
258 *x = rng.sample(&distr); in value_stability()
Dfloat.rs262 distr: &D, zero: T, expected: &[T], in value_stability()
267 *x = rng.sample(&distr); in value_stability()
Duniform.rs1137 …let distr = UniformDuration::new(std::time::Duration::from_secs(10), std::time::Duration::from_sec… in test_serialization_uniform_duration() localVariable
1138 …let de_distr: UniformDuration = bincode::deserialize(&bincode::serialize(&distr).unwrap()).unwrap(… in test_serialization_uniform_duration()
1140 distr.offset, de_distr.offset in test_serialization_uniform_duration()
1142 match (distr.mode, de_distr.mode) { in test_serialization_uniform_duration()
1585 let distr = Uniform::new(lb, ub); in value_stability() localVariable
1587 *x = rng.sample(&distr); in value_stability()
/external/openscreen/third_party/abseil/src/absl/random/internal/
Dseed_material.h70 random_internal::FastUniformBits<uint32_t> distr; in ReadSeedMaterialFromURBG() local
78 seed_value = distr(*urbg); in ReadSeedMaterialFromURBG()
/external/webrtc/third_party/abseil-cpp/absl/random/internal/
Dseed_material.h70 random_internal::FastUniformBits<uint32_t> distr; in ReadSeedMaterialFromURBG() local
78 seed_value = distr(*urbg); in ReadSeedMaterialFromURBG()
/external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/random/internal/
Dseed_material.h70 random_internal::FastUniformBits<uint32_t> distr; in ReadSeedMaterialFromURBG() local
78 seed_value = distr(*urbg); in ReadSeedMaterialFromURBG()
/external/angle/third_party/abseil-cpp/absl/random/internal/
Dseed_material.h70 random_internal::FastUniformBits<uint32_t> distr; in ReadSeedMaterialFromURBG() local
78 seed_value = distr(*urbg); in ReadSeedMaterialFromURBG()
/external/abseil-cpp/absl/random/internal/
Dseed_material.h70 random_internal::FastUniformBits<uint32_t> distr; in ReadSeedMaterialFromURBG() local
78 seed_value = distr(*urbg); in ReadSeedMaterialFromURBG()
/external/libtextclassifier/abseil-cpp/absl/random/internal/
Dseed_material.h70 random_internal::FastUniformBits<uint32_t> distr; in ReadSeedMaterialFromURBG() local
78 seed_value = distr(*urbg); in ReadSeedMaterialFromURBG()
/external/rust/crates/rand/src/
Drng.rs150 fn sample<T, D: Distribution<T>>(&mut self, distr: D) -> T { in sample()
151 distr.sample(self) in sample()
190 fn sample_iter<T, D>(self, distr: D) -> distributions::DistIter<D, Self, T> in sample_iter()
195 distr.sample_iter(self) in sample_iter()
/external/tensorflow/tensorflow/compiler/xla/tools/
Ddriver.cc337 std::uniform_int_distribution<T> distr(kLowerBound, kUpperBound); in FillIntT() local
339 casted[i] = distr(generator); in FillIntT()
348 std::uniform_real_distribution<T> distr(kLowerBoundFP, kUpperBoundFP); in FillFloatT() local
350 casted[i] = distr(generator); in FillFloatT()
/external/rust/crates/rand/src/seq/
Dindex.rs531 let distr = Uniform::new(X::zero(), length); in sample_rejection() localVariable
534 let mut pos = distr.sample(rng); in sample_rejection()
536 pos = distr.sample(rng); in sample_rejection()
Dmod.rs540 let distr = WeightedIndex::new(self.iter().map(weight))?; in choose_weighted() localVariable
541 Ok(&self[distr.sample(rng)]) in choose_weighted()
559 let distr = WeightedIndex::new(self.iter().map(weight))?; in choose_weighted_mut() localVariable
560 Ok(&mut self[distr.sample(rng)]) in choose_weighted_mut()