Home
last modified time | relevance | path

Searched refs:random_internal (Results 1 – 25 of 91) sorted by relevance

1234

/third_party/skia/third_party/externals/abseil-cpp/absl/random/
Ddistributions.h127 using distribution_t = random_internal::UniformDistributionWrapper<R>; in Uniform()
129 auto a = random_internal::uniform_lower_bound(tag, lo, hi); in Uniform()
130 auto b = random_internal::uniform_upper_bound(tag, lo, hi); in Uniform()
131 if (!random_internal::is_uniform_range_valid(a, b)) return lo; in Uniform()
133 return random_internal::DistributionCaller<gen_t>::template Call< in Uniform()
146 using distribution_t = random_internal::UniformDistributionWrapper<R>; in Uniform()
149 auto a = random_internal::uniform_lower_bound(tag, lo, hi); in Uniform()
150 auto b = random_internal::uniform_upper_bound(tag, lo, hi); in Uniform()
151 if (!random_internal::is_uniform_range_valid(a, b)) return lo; in Uniform()
153 return random_internal::DistributionCaller<gen_t>::template Call< in Uniform()
[all …]
Dmock_distributions.h83 using MockUniform = random_internal::MockOverloadSet<
84 random_internal::UniformDistributionWrapper<R>,
110 random_internal::MockOverloadSet<absl::bernoulli_distribution,
134 random_internal::MockOverloadSet<absl::beta_distribution<RealType>,
160 random_internal::MockOverloadSet<absl::exponential_distribution<RealType>,
185 random_internal::MockOverloadSet<absl::gaussian_distribution<RealType>,
210 using MockLogUniform = random_internal::MockOverloadSet<
235 random_internal::MockOverloadSet<absl::poisson_distribution<IntType>,
259 random_internal::MockOverloadSet<absl::zipf_distribution<IntType>,
Dgaussian_distribution.h38 namespace random_internal {
79 random_internal::FastUniformBits<uint64_t> fast_u64_;
87 class gaussian_distribution : random_internal::gaussian_distribution_base {
185 auto saver = random_internal::make_ostream_state_saver(os);
186 os.precision(random_internal::stream_precision_helper<RealType>::kPrecision);
198 auto saver = random_internal::make_istream_state_saver(is);
199 auto mean = random_internal::read_floating_point<result_type>(is);
201 auto stddev = random_internal::read_floating_point<result_type>(is);
208 namespace random_internal {
212 using random_internal::GeneratePositiveTag; in zignor_fallback()
[all …]
Dgaussian_distribution_test.cc43 using absl::random_internal::kChiSquared;
170 return mean() + stddev() * -absl::random_internal::InverseNormalSurvival(p); in InverseCDF()
206 absl::random_internal::pcg64_2018_engine rng_{0x2B7E151628AED2A6};
221 const double max_err = absl::random_internal::MaxErrorTolerance(p); in SingleZTest()
222 const auto m = absl::random_internal::ComputeDistributionMoments(data); in SingleZTest()
223 const double z = absl::random_internal::ZScore(mean(), m); in SingleZTest()
224 const bool pass = absl::random_internal::Near("z", z, 0.0, max_err); in SingleZTest()
289 const double threshold = absl::random_internal::ChiSquareValue(dof, 0.98); in SingleChiSquaredTest()
294 double chi_square = absl::random_internal::ChiSquareWithExpected( in SingleChiSquaredTest()
296 double p = absl::random_internal::ChiSquarePValue(chi_square, dof); in SingleChiSquaredTest()
[all …]
Dexponential_distribution_test.cc47 using absl::random_internal::kChiSquared;
201 absl::random_internal::pcg64_2018_engine rng_{0x2B7E151628AED2A6};
216 const auto m = absl::random_internal::ComputeDistributionMoments(data); in SingleZTest()
217 const double max_err = absl::random_internal::MaxErrorTolerance(p); in SingleZTest()
218 const double z = absl::random_internal::ZScore(mean(), m); in SingleZTest()
219 const bool pass = absl::random_internal::Near("z", z, 0.0, max_err); in SingleZTest()
267 const double threshold = absl::random_internal::ChiSquareValue(dof, 0.98); in SingleChiSquaredTest()
272 double chi_square = absl::random_internal::ChiSquareWithExpected( in SingleChiSquaredTest()
274 double p = absl::random_internal::ChiSquarePValue(chi_square, dof); in SingleChiSquaredTest()
296 const double p = absl::random_internal::RequiredSuccessProbability( in TEST_P()
[all …]
Dpoisson_distribution.h125 random_internal::FastUniformBits<uint64_t> fast_u64_;
158 log_k_ = lmu_ * mode - absl::random_internal::StirlingLogFactorial(mode); in param_type()
168 using random_internal::GeneratePositiveTag; in operator()
169 using random_internal::GenerateRealFromBits; in operator()
170 using random_internal::GenerateSignedTag; in operator()
221 : absl::random_internal::StirlingLogFactorial(x); in operator()
235 auto saver = random_internal::make_ostream_state_saver(os);
236 os.precision(random_internal::stream_precision_helper<double>::kPrecision);
247 auto saver = random_internal::make_istream_state_saver(is);
248 double mean = random_internal::read_floating_point<double>(is);
Duniform_real_distribution_test.cc229 absl::random_internal::pcg64_2018_engine rng{0x2B7E151628AED2A6}; in TYPED_TEST()
237 absl::random_internal::ComputeDistributionMoments(values); in TYPED_TEST()
245 using absl::random_internal::kChiSquared; in TYPED_TEST()
258 absl::random_internal::ChiSquareValue(kBuckets - 1, 0.999999); in TYPED_TEST()
263 absl::random_internal::pcg64_2018_engine rng{0x2B7E151628AED2A6}; in TYPED_TEST()
279 double chi_square = absl::random_internal::ChiSquareWithExpected( in TYPED_TEST()
283 absl::random_internal::ChiSquarePValue(chi_square, kBuckets); in TYPED_TEST()
302 absl::random_internal::sequence_urbg urbg( in TYPED_TEST()
326 absl::random_internal::sequence_urbg urbg({0x0000000000000001ull}); in TEST()
333 absl::random_internal::sequence_urbg urbg({0x7fffffffffffffefull}); in TEST()
[all …]
Dpoisson_distribution_test.cc65 using absl::random_internal::kChiSquared;
264 absl::random_internal::pcg64_2018_engine rng_{0x2B7E151628AED2A6};
283 const auto m = absl::random_internal::ComputeDistributionMoments(data); in SingleZTest()
284 const double max_err = absl::random_internal::MaxErrorTolerance(p); in SingleZTest()
285 const double z = absl::random_internal::ZScore(mean(), m); in SingleZTest()
286 const bool pass = absl::random_internal::Near("z", z, 0.0, max_err); in SingleZTest()
307 const double p = absl::random_internal::RequiredSuccessProbability( in TEST_P()
370 absl::random_internal::pcg64_2018_engine rng_{0x2B7E151628AED2A6};
431 const double threshold = absl::random_internal::ChiSquareValue(dof, 0.98); in ChiSquaredTestImpl()
433 const double chi_square = absl::random_internal::ChiSquare( in ChiSquaredTestImpl()
[all …]
Duniform_int_distribution.h61 typename random_internal::make_unsigned_bits<IntType>::type;
165 typename random_internal::stream_format_type<IntType>::type;
166 auto saver = random_internal::make_ostream_state_saver(os);
179 typename random_internal::stream_format_type<IntType>::type;
184 auto saver = random_internal::make_istream_state_saver(is);
195 typename random_internal::make_unsigned_bits<IntType>::type
198 typename random_internal::make_unsigned_bits<IntType>::type R) { in Generate()
199 random_internal::FastUniformBits<unsigned_type> fast_bits; in Generate()
247 using helper = random_internal::wide_multiply<unsigned_type>; in Generate()
Duniform_real_distribution.h146 random_internal::FastUniformBits<uint64_t> fast_u64_;
157 using random_internal::GeneratePositiveTag; in operator()
158 using random_internal::GenerateRealFromBits; in operator()
178 auto saver = random_internal::make_ostream_state_saver(os);
179 os.precision(random_internal::stream_precision_helper<RealType>::kPrecision);
190 auto saver = random_internal::make_istream_state_saver(is);
191 auto a = random_internal::read_floating_point<result_type>(is);
193 auto b = random_internal::read_floating_point<result_type>(is);
Drandom.h120 using BitGen = random_internal::NonsecureURBGBase<
121 random_internal::randen_engine<uint64_t>>;
162 random_internal::NonsecureURBGBase<random_internal::pcg64_2018_engine>;
Dexponential_distribution.h110 random_internal::FastUniformBits<uint64_t> fast_u64_;
123 using random_internal::GenerateNegativeTag; in operator()
124 using random_internal::GenerateRealFromBits; in operator()
140 auto saver = random_internal::make_ostream_state_saver(os);
141 os.precision(random_internal::stream_precision_helper<RealType>::kPrecision);
154 auto saver = random_internal::make_istream_state_saver(is);
155 lambda = random_internal::read_floating_point<result_type>(is);
Ddiscrete_distribution_test.cc108 absl::random_internal::InitDiscreteDistribution(&p); in TEST()
123 absl::random_internal::InitDiscreteDistribution(&p); in TEST()
146 using absl::random_internal::kChiSquared; in TEST()
155 absl::random_internal::ChiSquareValue(kBuckets, 0.99999); in TEST()
164 absl::random_internal::pcg64_2018_engine rng(0x2B7E151628AED2A6); in TEST()
182 absl::random_internal::ChiSquare(std::begin(counts), std::end(counts), in TEST()
187 absl::random_internal::ChiSquarePValue(chi_square, kBuckets); in TEST()
205 absl::random_internal::sequence_urbg urbg( in TEST()
Dseed_sequences.h55 using SeedSeq = random_internal::SaltedSeedSeq<std::seed_seq>;
81 seed_material[random_internal::kEntropyBlocksNeeded]; in CreateSeedSeqFrom()
83 if (!random_internal::ReadSeedMaterialFromURBG( in CreateSeedSeqFrom()
85 random_internal::ThrowSeedGenException(); in CreateSeedSeqFrom()
Dbeta_distribution_test.cc149 absl::random_internal::pcg64_2018_engine rng(0x2B7E151628AED2A6); in TYPED_TEST()
302 const auto m = absl::random_internal::ComputeDistributionMoments(data); in SingleZTestOnMeanAndVariance()
314 const double max_err = absl::random_internal::MaxErrorTolerance(p); in SingleZTestOnMeanAndVariance()
315 const double z_mean = absl::random_internal::ZScore(Mean(), m); in SingleZTestOnMeanAndVariance()
317 absl::random_internal::Near("z", z_mean, 0.0, max_err) && in SingleZTestOnMeanAndVariance()
318 absl::random_internal::Near("z_variance", z_variance, 0.0, max_err); in SingleZTestOnMeanAndVariance()
344 absl::random_internal::BetaIncompleteInv(alpha_, beta_, p); in SingleChiSquaredTest()
384 const double chi_square = absl::random_internal::ChiSquare( in SingleChiSquaredTest()
387 (absl::random_internal::ChiSquarePValue(chi_square, dof) >= p); in SingleChiSquaredTest()
399 absl::random_internal::kChiSquared, chi_square, in SingleChiSquaredTest()
[all …]
Dbeta_distribution.h253 random_internal::FastUniformBits<uint8_t> fast_u8; in DegenerateCase()
261 random_internal::FastUniformBits<uint64_t> fast_u64_;
280 using random_internal::GeneratePositiveTag; in AlgorithmJoehnk()
281 using random_internal::GenerateRealFromBits; in AlgorithmJoehnk()
338 using random_internal::GeneratePositiveTag; in AlgorithmCheng()
339 using random_internal::GenerateRealFromBits; in AlgorithmCheng()
400 auto saver = random_internal::make_ostream_state_saver(os);
401 os.precision(random_internal::stream_precision_helper<RealType>::kPrecision);
414 auto saver = random_internal::make_istream_state_saver(is);
415 alpha = random_internal::read_floating_point<result_type>(is);
[all …]
Dbit_gen_ref.h35 namespace random_internal {
111 random_internal::is_urbg<URBG>::value &&
120 random_internal::is_urbg<URBG>::value &&
148 absl::random_internal::FastUniformBits<result_type> fast_uniform_bits;
174 friend struct ::absl::random_internal::DistributionCaller; // for InvokeMock
175 friend class ::absl::random_internal::MockHelpers; // for InvokeMock
Duniform_int_distribution_test.cc141 absl::random_internal::pcg64_2018_engine rng{0x2B7E151628AED2A6}; in TYPED_TEST()
154 auto moments = absl::random_internal::ComputeDistributionMoments(values); in TYPED_TEST()
172 using absl::random_internal::kChiSquared; in TYPED_TEST()
181 absl::random_internal::ChiSquareValue(kBuckets, 0.999999); in TYPED_TEST()
189 absl::random_internal::pcg64_2018_engine rng{0x2B7E151628AED2A6}; in TYPED_TEST()
198 double chi_square = absl::random_internal::ChiSquareWithExpected( in TYPED_TEST()
202 absl::random_internal::ChiSquarePValue(chi_square, kBuckets); in TYPED_TEST()
219 absl::random_internal::sequence_urbg urbg( in TEST()
Dbernoulli_distribution.h111 auto saver = random_internal::make_ostream_state_saver(os);
112 os.precision(random_internal::stream_precision_helper<double>::kPrecision);
121 auto saver = random_internal::make_istream_state_saver(is);
122 auto p = random_internal::read_floating_point<double>(is);
132 random_internal::FastUniformBits<uint32_t> fast_u32; in Generate()
/third_party/skia/third_party/externals/abseil-cpp/absl/random/internal/
Dseed_material_test.cc44 EXPECT_EQ(0, absl::random_internal::SeedBitsToBlocks(0)); in TEST()
45 EXPECT_EQ(1, absl::random_internal::SeedBitsToBlocks(1)); in TEST()
46 EXPECT_EQ(1, absl::random_internal::SeedBitsToBlocks(31)); in TEST()
47 EXPECT_EQ(1, absl::random_internal::SeedBitsToBlocks(32)); in TEST()
48 EXPECT_EQ(2, absl::random_internal::SeedBitsToBlocks(33)); in TEST()
49 EXPECT_EQ(4, absl::random_internal::SeedBitsToBlocks(127)); in TEST()
50 EXPECT_EQ(4, absl::random_internal::SeedBitsToBlocks(128)); in TEST()
51 EXPECT_EQ(5, absl::random_internal::SeedBitsToBlocks(129)); in TEST()
59 EXPECT_TRUE(absl::random_internal::ReadSeedMaterialFromOSEntropy( in TEST()
61 EXPECT_TRUE(absl::random_internal::ReadSeedMaterialFromOSEntropy( in TEST()
[all …]
Ddistribution_test_util_test.cc37 auto value = absl::random_internal::erfinv(data.z); in TEST()
121 auto value = absl::random_internal::BetaIncomplete(data.x, data.p, data.q); in TEST()
133 absl::random_internal::BetaIncompleteInv(data.p, data.q, data.alpha); in TEST()
153 EXPECT_NEAR(absl::random_internal::MaxErrorTolerance(entry.first), in TEST()
159 absl::random_internal::DistributionMoments m; in TEST()
163 EXPECT_NEAR(absl::random_internal::ZScore(5, m), 0, 1e-12); in TEST()
168 EXPECT_NEAR(absl::random_internal::ZScore(0, m), 0, 1e-12); in TEST()
173 EXPECT_NEAR(absl::random_internal::ZScore(-5, m), 0, 1e-12); in TEST()
177 absl::random_internal::DistributionMoments m; in TEST()
181 EXPECT_NEAR(absl::random_internal::ZScore(4, m), 10, 1e-12); in TEST()
[all …]
Dranden_hwaes_test.cc27 using absl::random_internal::RandenHwAes;
28 using absl::random_internal::RandenTraits;
42 EXPECT_TRUE(absl::random_internal::CPUSupportsRandenHwAes()); in TEST()
93 int x = absl::random_internal::HasRandenHwAesImplementation(); in main()
96 int y = absl::random_internal::CPUSupportsRandenHwAes(); in main()
Dexplicit_seed_seq_test.cc67 EXPECT_TRUE(ConformsToInterface<absl::random_internal::ExplicitSeedSeq>()); in TEST()
74 absl::random_internal::ExplicitSeedSeq seq; in TEST()
90 absl::random_internal::ExplicitSeedSeq seq(seed_material, in TEST()
136 absl::random_internal::ExplicitSeedSeq seq_from_entropy(std::begin(entropy), in TEST()
140 absl::random_internal::ExplicitSeedSeq seq_copy(seq_from_entropy); in TEST()
158 absl::random_internal::ExplicitSeedSeq another_seq(std::begin(entropy), in TEST()
190 absl::random_internal::ExplicitSeedSeq moved_seq( in TEST()
Dpcg_engine.h29 namespace random_internal {
113 auto saver = random_internal::make_ostream_state_saver(os);
114 random_internal::stream_u128_helper<state_type> helper;
129 auto saver = random_internal::make_ostream_state_saver(os);
142 random_internal::stream_u128_helper<state_type> helper;
294 random_internal::pcg128_params<0x2360ed051fc65da4ull, 0x4385df649fccf645ull,
296 random_internal::pcg_xsl_rr_128_64>;
301 random_internal::pcg64_params<0x5851f42d4c957f2dull, 0x14057b7ef767814full>,
302 random_internal::pcg_xsh_rr_64_32>;
Dranden_engine_test.cc31 using randen_u64 = absl::random_internal::randen_engine<uint64_t>;
32 using randen_u32 = absl::random_internal::randen_engine<uint32_t>;
33 using absl::random_internal::ExplicitSeedSeq;
45 using randen = typename absl::random_internal::randen_engine<TypeParam>; in TYPED_TEST()
106 using randen = typename absl::random_internal::randen_engine<TypeParam>; in TYPED_TEST()
132 using randen = typename absl::random_internal::randen_engine<TypeParam>; in TYPED_TEST()
142 using randen = typename absl::random_internal::randen_engine<TypeParam>; in TYPED_TEST()
165 using randen = typename absl::random_internal::randen_engine<TypeParam>; in TYPED_TEST()
236 using randen = typename absl::random_internal::randen_engine<TypeParam>; in TYPED_TEST()

1234