/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
D | CompactDecimalFormatTest.java | 370 CompactDecimalFormat cdf = in TestDefaultSignificantDigits() local 372 assertEquals("Default significant digits", "123K", cdf.format(123456)); in TestDefaultSignificantDigits() 373 assertEquals("Default significant digits", "12K", cdf.format(12345)); in TestDefaultSignificantDigits() 374 assertEquals("Default significant digits", "1.2K", cdf.format(1234)); in TestDefaultSignificantDigits() 375 assertEquals("Default significant digits", "123", cdf.format(123)); in TestDefaultSignificantDigits() 380 CompactDecimalFormat cdf = in TestCharacterIterator() local 382 AttributedCharacterIterator iter = cdf.formatToCharacterIterator(1234567); in TestCharacterIterator() 384 iter = cdf.formatToCharacterIterator(1234567); in TestCharacterIterator() 398 NumberFormat cdf = in TestArabicLongStyle() local 400 … assertEquals("Arabic Long", "\u061C-\u0665\u066B\u0663 \u0623\u0644\u0641", cdf.format(-5300)); in TestArabicLongStyle() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | CompactDecimalFormatTest.java | 367 CompactDecimalFormat cdf = in TestDefaultSignificantDigits() local 369 assertEquals("Default significant digits", "123K", cdf.format(123456)); in TestDefaultSignificantDigits() 370 assertEquals("Default significant digits", "12K", cdf.format(12345)); in TestDefaultSignificantDigits() 371 assertEquals("Default significant digits", "1.2K", cdf.format(1234)); in TestDefaultSignificantDigits() 372 assertEquals("Default significant digits", "123", cdf.format(123)); in TestDefaultSignificantDigits() 377 CompactDecimalFormat cdf = in TestCharacterIterator() local 379 AttributedCharacterIterator iter = cdf.formatToCharacterIterator(1234567); in TestCharacterIterator() 381 iter = cdf.formatToCharacterIterator(1234567); in TestCharacterIterator() 395 NumberFormat cdf = in TestArabicLongStyle() local 397 … assertEquals("Arabic Long", "\u061C-\u0665\u066B\u0663 \u0623\u0644\u0641", cdf.format(-5300)); in TestArabicLongStyle() [all …]
|
/external/libaom/libaom/tools/ |
D | gen_constrained_tokenset.py | 37 cdf = cdf_spareto 40 return ((cdf(1.5, x, beta) - cdf(0.5, x, beta)) / 41 (1 - cdf(0.5, x, beta)) - p)**2 45 parray[0] = 2 * (cdf(0.5, alpha, beta) - 0.5) 46 parray[1] = (2 * (cdf(1.5, alpha, beta) - cdf(0.5, alpha, beta))) 47 parray[2] = (2 * (cdf(2.5, alpha, beta) - cdf(1.5, alpha, beta))) 48 parray[3] = (2 * (cdf(3.5, alpha, beta) - cdf(2.5, alpha, beta))) 49 parray[4] = (2 * (cdf(4.5, alpha, beta) - cdf(3.5, alpha, beta))) 50 parray[5] = (2 * (cdf(6.5, alpha, beta) - cdf(4.5, alpha, beta))) 51 parray[6] = (2 * (cdf(10.5, alpha, beta) - cdf(6.5, alpha, beta))) [all …]
|
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/ |
D | binomial_test.py | 81 binom.cdf([2., 3, 2]).eval() 82 binom.cdf([3., 1, 2]).eval() 88 binom.cdf([-1., 4, 2]).eval() 90 binom.cdf([7., 3, 0]).eval() 100 binom.cdf([2., 3, 2]).eval() 101 binom.cdf([3., 1, 2]).eval() 109 binom.cdf(placeholder).eval(feed_dict={placeholder: [1.0, 2.5, 1.5]}) 113 binom.cdf([1., 2., 3.]).eval() 116 binom.cdf([1.0, 2.5, 1.5]).eval() 125 cdf = binom.cdf(counts) [all …]
|
D | quantized_distribution_test.py | 82 qdist.cdf([-1., 0., 1., 2., 2.5, 3., 4., 5.])) 111 qdist.cdf([-3., -2., -1., 0., 0.5, 1.0, 10.0])) 164 self.assertAllClose(expected_cdf, qdist.cdf(x).eval()) 208 z = qdist.cdf(x) 254 self.assertAllClose(sp_normal.cdf(x), qdist.cdf(x).eval()) 288 self.assertAllClose(sm_normal.cdf(-2), qdist.prob(-2.).eval(), atol=0) 291 sm_normal.cdf(-1) - sm_normal.cdf(-2), qdist.prob(-1.).eval(), atol=0) 294 sm_normal.cdf(0) - sm_normal.cdf(-1), qdist.prob(0.).eval(), atol=0) 296 self.assertAllClose(1. - sm_normal.cdf(1), qdist.prob(2.).eval(), atol=0) 311 np.log(sm_normal.cdf(-2)), qdist.log_prob(-2.).eval(), atol=0) [all …]
|
D | poisson_test.py | 121 cdf = poisson.cdf(x) 122 self.assertEqual(cdf.get_shape(), (6,)) 123 self.assertAllClose(cdf.eval(), stats.poisson.cdf(x, lam_v)) 133 cdf = poisson.cdf(x) 134 self.assertEqual(cdf.get_shape(), (6,)) 138 self.assertAllClose(cdf.eval(), special.gammaincc(1. + x, lam_v)) 142 poisson_validate.cdf(x).eval() 156 cdf = poisson.cdf(x) 157 self.assertEqual(cdf.get_shape(), (6, 3)) 158 self.assertAllClose(cdf.eval(), stats.poisson.cdf(x, lam_v))
|
D | deterministic_test.py | 121 cdf = deterministic.cdf(x) 122 self.assertAllEqual((2, 2), cdf.get_shape()) 123 self.assertAllEqual(expected_cdf, cdf.eval()) 131 cdf = deterministic.cdf(x) 132 self.assertAllEqual((2, 2), cdf.get_shape()) 133 self.assertAllEqual(expected_cdf, cdf.eval()) 141 cdf = deterministic.cdf(x) 142 self.assertAllEqual((2, 2), cdf.get_shape()) 143 self.assertAllEqual(expected_cdf, cdf.eval())
|
/external/tensorflow/tensorflow/contrib/coder/kernels/ |
D | pmf_to_cdf_op.cc | 63 auto cdf = cdf_tensor->flat_inner_dims<int32, 2>(); in Compute() local 64 CHECK_EQ(pmf.dimension(0), cdf.dimension(0)); in Compute() 65 CHECK_EQ(pmf.dimension(1) + 1, cdf.dimension(1)); in Compute() 73 [this, pmf, &cdf](int64 start, int64 limit) { in Compute() 76 cdf(i, 0) = 0; in Compute() 77 PerShard({&pmf(i, 0), pmf_size}, {&cdf(i, 1), pmf_size}); in Compute() 139 gtl::MutableArraySlice<int32> cdf) const { in PerShard() 140 CHECK_EQ(pmf.size(), cdf.size()); in PerShard() 143 std::transform(pmf.begin(), pmf.end(), cdf.begin(), in PerShard() 151 int32 sum = std::accumulate(cdf.begin(), cdf.end(), 0); in PerShard() [all …]
|
D | range_coder_ops_test.cc | 131 const Tensor& cdf) { in TestEncodeAndDecode() argument 133 TF_ASSERT_OK(RunEncodeOp(precision, {data, cdf}, &encoded)); in TestEncodeAndDecode() 142 TF_ASSERT_OK(RunDecodeOp(precision, {encoded, shape, cdf}, &decoded)); in TestEncodeAndDecode() 221 Tensor cdf{DT_INT32, {1, 32, 32, 16, kMaxValue + 2}}; in TEST_F() local 222 cdf.tensor<int32, 5>() = temp.tensor<int32, 5>().broadcast(broadcast); in TEST_F() 224 TestEncodeAndDecode(kPrecision, data, cdf); in TEST_F() 245 Tensor cdf{DT_INT32, {1, 1, kDimensionSize, kMaxMaxValue + 2}}; in TEST_F() local 246 BuildCdf(&gen, &data, &cdf, maxvalue1); in TEST_F() 247 TestEncodeAndDecode(kPrecision, data, cdf); in TEST_F() 255 Tensor cdf{DT_INT32, {1, kDimensionSize, 1, kMaxMaxValue + 2}}; in TEST_F() local [all …]
|
D | range_coder_ops.cc | 146 const Tensor& cdf = context->input(1); in Compute() local 148 OP_REQUIRES_OK(context, CheckCdfShape(data.shape(), cdf.shape())); in Compute() 152 context, MergeAxes(data.shape(), cdf.shape(), &data_shape, &cdf_shape)); in Compute() 163 cdf.flat_inner_dims<int32, 2>(), cdf_shape, output); \ in Compute() 175 cdf.shape().DebugString())); in Compute() 184 TTypes<int32>::ConstMatrix cdf, in RangeEncodeImpl() argument 187 const int64 cdf_size = cdf.size(); in RangeEncodeImpl() 188 const int64 chip_size = cdf.dimension(1); in RangeEncodeImpl() 191 cdf.data(), cdf_shape}; in RangeEncodeImpl() 201 DCHECK_LE(cdf_slice + chip_size, cdf.data() + cdf_size); in RangeEncodeImpl() [all …]
|
D | range_coder_test.cc | 51 std::vector<int32> cdf(histogram.size() + 1, 0); in RangeEncodeDecodeTest() local 55 cdf[i + 1] = partial_sum / multiplier; in RangeEncodeDecodeTest() 58 ASSERT_EQ(cdf.front(), 0); in RangeEncodeDecodeTest() 59 ASSERT_EQ(cdf.back(), 1 << precision); in RangeEncodeDecodeTest() 64 ideal_code_length[i] = -std::log2((cdf[i + 1] - cdf[i]) / normalizer); in RangeEncodeDecodeTest() 71 encoder.Encode(cdf[x], cdf[x + 1], &encoded); in RangeEncodeDecodeTest() 84 const int32 decoded = decoder.Decode(cdf); in RangeEncodeDecodeTest()
|
D | range_coder.cc | 308 int32 RangeDecoder::Decode(tensorflow::gtl::ArraySlice<int32> cdf) { in Decode() argument 319 const int32* pv = cdf.data() + 1; in Decode() 322 auto len = cdf.size() - 1; in Decode() 343 CHECK_LT(pv, cdf.data() + cdf.size()); in Decode() 361 return pv - cdf.data() - 1; in Decode()
|
D | pmf_to_cdf_op_test.cc | 71 auto cdf = cdf_tensor.flat_inner_dims<int32, 2>(); in Verify() local 72 EXPECT_EQ(pmf.dimension(1) + 1, cdf.dimension(1)); in Verify() 76 EXPECT_EQ(0, cdf(i, 0)); in Verify() 78 TTypes<int32>::UnalignedConstVec cdf_slice(&cdf(i, 0), cdf.dimension(1)); in Verify()
|
/external/icu/icu4c/source/test/intltest/ |
D | compactdecimalformattest.cpp | 254 const CompactDecimalFormat* cdf, const ExpectedResult* expectedResult, 328 LocalPointer<CompactDecimalFormat> cdf(createCDFInstance("sw", UNUM_SHORT, status)); in TestFieldPosition() local 335 cdf->format(1234567.0, result, fp); in TestFieldPosition() 365 …LocalPointer<CompactDecimalFormat> cdf(CompactDecimalFormat::createInstance("en", UNUM_SHORT, stat… in TestDefaultSignificantDigits() local 373 assertEquals("Default significant digits", u"123K", cdf->format(123456, actual.remove())); in TestDefaultSignificantDigits() 374 assertEquals("Default significant digits", u"12K", cdf->format(12345, actual.remove())); in TestDefaultSignificantDigits() 375 assertEquals("Default significant digits", u"1.2K", cdf->format(1234, actual.remove())); in TestDefaultSignificantDigits() 376 assertEquals("Default significant digits", u"123", cdf->format(123, actual.remove())); in TestDefaultSignificantDigits() 381 …LocalPointer<CompactDecimalFormat> cdf(CompactDecimalFormat::createInstance("en", UNUM_SHORT, stat… in TestAPIVariants() local 395 cdf->format((double)123456.0, actual, pos); in TestAPIVariants() [all …]
|
/external/webrtc/webrtc/modules/audio_coding/codecs/isac/main/source/ |
D | arith_routines_hist.c | 20 const uint16_t **cdf, /* input: array of cdf arrays */ in WebRtcIsac_EncHistMulti() argument 38 cdf_lo = (uint32_t) *(*cdf + *data); in WebRtcIsac_EncHistMulti() 39 cdf_hi = (uint32_t) *(*cdf++ + *data++ + 1); in WebRtcIsac_EncHistMulti() 87 const uint16_t **cdf, /* input: array of cdf arrays */ in WebRtcIsac_DecHistBisectMulti() argument 126 cdf_ptr = *cdf + (size_tmp - 1); in WebRtcIsac_DecHistBisectMulti() 147 *data++ = (int)(cdf_ptr - *cdf++); in WebRtcIsac_DecHistBisectMulti() 150 *data++ = (int)(cdf_ptr - *cdf++ - 1); in WebRtcIsac_DecHistBisectMulti() 195 const uint16_t **cdf, /* input: array of cdf arrays */ in WebRtcIsac_DecHistOneStepMulti() argument 233 cdf_ptr = *cdf + (*init_index++); in WebRtcIsac_DecHistOneStepMulti() 249 *data++ = (int)(cdf_ptr - *cdf++ - 1); in WebRtcIsac_DecHistOneStepMulti() [all …]
|
/external/tensorflow/tensorflow/contrib/coder/python/ops/ |
D | coder_ops_test.py | 39 cdf = math_ops.cumsum(histogram, exclusive=False) 40 cdf = array_ops.pad(cdf, [[1, 0]]) 41 cdf = array_ops.reshape(cdf, [1, 1, -1]) 44 encoded = coder_ops.range_encode(data, cdf, precision=14) 46 encoded, array_ops.shape(data), cdf, precision=14)
|
/external/webrtc/webrtc/modules/audio_coding/codecs/isac/fix/source/ |
D | arith_routines_hist.c | 37 const uint16_t **cdf, in WebRtcIsacfix_EncHistMulti() argument 63 cdfLo = (uint32_t) *(*cdf + (uint32_t)*data); in WebRtcIsacfix_EncHistMulti() 64 cdfHi = (uint32_t) *(*cdf++ + (uint32_t)*data++ + 1); in WebRtcIsacfix_EncHistMulti() 149 const uint16_t **cdf, in WebRtcIsacfix_DecHistBisectMulti() argument 191 cdfPtr = *cdf + (sizeTmp - 1); in WebRtcIsacfix_DecHistBisectMulti() 215 *data++ = cdfPtr - *cdf++; in WebRtcIsacfix_DecHistBisectMulti() 218 *data++ = cdfPtr - *cdf++ - 1; in WebRtcIsacfix_DecHistBisectMulti() 284 const uint16_t **cdf, in WebRtcIsacfix_DecHistOneStepMulti() argument 323 cdfPtr = *cdf + (*initIndex++); in WebRtcIsacfix_DecHistOneStepMulti() 346 *data++ = cdfPtr - *cdf++ - 1; in WebRtcIsacfix_DecHistOneStepMulti() [all …]
|
/external/libaom/libaom/aom_dsp/ |
D | bitreader.h | 44 #define aom_read_cdf(r, cdf, nsymbs, ACCT_STR_NAME) \ argument 45 aom_read_cdf_(r, cdf, nsymbs ACCT_STR_ARG(ACCT_STR_NAME)) 46 #define aom_read_symbol(r, cdf, nsymbs, ACCT_STR_NAME) \ argument 47 aom_read_symbol_(r, cdf, nsymbs ACCT_STR_ARG(ACCT_STR_NAME)) 132 static INLINE int aom_read_cdf_(aom_reader *r, const aom_cdf_prob *cdf, in aom_read_cdf_() argument 135 ret = daala_read_symbol(r, cdf, nsymbs); in aom_read_cdf_() 144 static INLINE int aom_read_symbol_(aom_reader *r, aom_cdf_prob *cdf, in aom_read_symbol_() argument 147 ret = aom_read_cdf(r, cdf, nsymbs, ACCT_STR_NAME); in aom_read_symbol_() 148 if (r->allow_update_cdf) update_cdf(cdf, ret, nsymbs); in aom_read_symbol_()
|
D | daalaboolwriter.h | 42 aom_cdf_prob cdf[2] = { (aom_cdf_prob)p, 32767 }; in aom_daala_write() local 51 bitstream_queue_push(bit, cdf, 2); in aom_daala_write() 58 const aom_cdf_prob *cdf, int nsymbs) { in daala_write_symbol() argument 68 bitstream_queue_push(symb, cdf, nsymbs); in daala_write_symbol() 71 od_ec_encode_cdf_q15(&w->ec, symb, cdf, nsymbs); in daala_write_symbol()
|
D | bitwriter.h | 75 const aom_cdf_prob *cdf, int nsymbs) { in aom_write_cdf() argument 76 daala_write_symbol(w, symb, cdf, nsymbs); in aom_write_cdf() 79 static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf, in aom_write_symbol() argument 81 aom_write_cdf(w, symb, cdf, nsymbs); in aom_write_symbol() 82 if (w->allow_update_cdf) update_cdf(cdf, symb, nsymbs); in aom_write_symbol()
|
D | daalaboolreader.h | 104 static INLINE int daala_read_symbol(daala_reader *r, const aom_cdf_prob *cdf, in daala_read_symbol() argument 107 assert(cdf != NULL); in daala_read_symbol() 108 symb = od_ec_decode_cdf_q15(&r->ec, cdf, nsymbs); in daala_read_symbol() 128 if (cdf[i] != ref_cdf[i]) cdf_error = 1; in daala_read_symbol() 132 cdf[0]); in daala_read_symbol() 133 for (i = 1; i < nsymbs; ++i) fprintf(stderr, ", %d", cdf[i]); in daala_read_symbol()
|
/external/libaom/libaom/test/ |
D | ec_test.cc | 68 uint16_t cdf[2]; in TEST() local 69 cdf[0] = OD_ICDF(fz[j]); in TEST() 70 cdf[1] = OD_ICDF(1U << fts[j]); in TEST() 71 od_ec_encode_cdf_q15(&enc, data[j], cdf, 2); in TEST() 106 uint16_t cdf[2]; in TEST() local 107 cdf[0] = OD_ICDF(fz[j]); in TEST() 108 cdf[1] = OD_ICDF(1U << fts[j]); in TEST() 109 sym = od_ec_decode_cdf_q15(&dec, cdf, 2); in TEST()
|
/external/libaom/libaom/av1/encoder/ |
D | cost.c | 29 void av1_cost_tokens_from_cdf(int *costs, const aom_cdf_prob *cdf, in av1_cost_tokens_from_cdf() argument 34 aom_cdf_prob p15 = AOM_ICDF(cdf[i]) - prev_cdf; in av1_cost_tokens_from_cdf() 36 prev_cdf = AOM_ICDF(cdf[i]); in av1_cost_tokens_from_cdf() 44 if (cdf[i] == AOM_ICDF(CDF_PROB_TOP)) break; in av1_cost_tokens_from_cdf()
|
/external/tensorflow/tensorflow/python/kernel_tests/distributions/ |
D | exponential_test.py | 83 cdf = exponential.cdf(x) 84 self.assertEqual(cdf.get_shape(), (6,)) 88 expected_cdf = stats.expon.cdf(x, scale=1 / lam_v) 89 self.assertAllClose(self.evaluate(cdf), expected_cdf) 150 stats.expon(scale=1.0 / lam_v[i]).cdf)[0], 0.01) 171 stats.expon(scale=1.0 / lam_v[i]).cdf)[0], 0.01) 174 stats.expon(scale=1.0 / lam_v[i]).cdf)[0], 0.01)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | array_ops_test.py | 1406 cdf = np.array([0, .2, .5, .6, .8, 1.], dtype=np.float32) 1409 result = np.searchsorted(cdf, arr, side="right") 1410 tf_result = self.evaluate(array_ops.searchsorted(cdf, arr, side="right")) 1417 cdf = np.cumsum( 1421 tf_result = self.evaluate(array_ops.searchsorted(cdf, arr, side="right")) 1423 cdf = cdf.reshape([-1, dim_size]) 1427 result[i, :] = np.searchsorted(cdf[i, :], arr[i, :], side="right") 1437 cdf = np.cumsum( 1444 tf_result = self.evaluate(array_ops.searchsorted(cdf, arr, side="right")) 1448 result[i, :] = np.searchsorted(cdf[i, :], arr[i, :], side="right") [all …]
|