Home
last modified time | relevance | path

Searched refs:isWithin (Results 1 – 25 of 40) sorted by relevance

12

/external/guava/guava-tests/test/com/google/common/math/
DStatsAccumulatorTest.java213 assertThat(oneValueAccumulator.mean()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); in testMean()
214 assertThat(oneValueAccumulatorByAddAllEmptyStats.mean()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); in testMean()
215 assertThat(twoValuesAccumulator.mean()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN); in testMean()
217 .isWithin(ALLOWED_ERROR) in testMean()
220 .isWithin(ALLOWED_ERROR) in testMean()
223 .isWithin(ALLOWED_ERROR) in testMean()
226 .isWithin(ALLOWED_ERROR) in testMean()
229 .isWithin(ALLOWED_ERROR) in testMean()
232 .isWithin(ALLOWED_ERROR) in testMean()
235 .isWithin(ALLOWED_ERROR) in testMean()
[all …]
DStatsTest.java127 assertThat(ONE_VALUE_STATS.mean()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); in testMean()
131 assertThat(TWO_VALUES_STATS.mean()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN); in testMean()
147 .isWithin(ALLOWED_ERROR) in testMean()
151 assertThat(MANY_VALUES_STATS_ITERABLE.mean()).isWithin(ALLOWED_ERROR).of(MANY_VALUES_MEAN); in testMean()
152 assertThat(MANY_VALUES_STATS_ITERATOR.mean()).isWithin(ALLOWED_ERROR).of(MANY_VALUES_MEAN); in testMean()
153 assertThat(MANY_VALUES_STATS_SNAPSHOT.mean()).isWithin(ALLOWED_ERROR).of(MANY_VALUES_MEAN); in testMean()
155 .isWithin(ALLOWED_ERROR * Double.MAX_VALUE) in testMean()
158 .isWithin(ALLOWED_ERROR * INTEGER_MANY_VALUES_MEAN) in testMean()
161 .isWithin(ALLOWED_ERROR * INTEGER_MANY_VALUES_MEAN) in testMean()
164 .isWithin(ALLOWED_ERROR * Integer.MAX_VALUE) in testMean()
[all …]
DPairedStatsAccumulatorTest.java187 assertThat(oneValueAccumulator.populationCovariance()).isWithin(0.0).of(0.0); in testPopulationCovariance()
189 .isWithin(0.0) in testPopulationCovariance()
192 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
195 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
198 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
201 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
221 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
225 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
229 assertThat(horizontalValuesAccumulator.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance()
231 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
[all …]
DStatsTesting.java384 assertThat(actualStats.mean()).isWithin(ALLOWED_ERROR).of(expectedStats.mean()); in assertStatsApproxEqual()
385 assertThat(actualStats.populationVariance()).isWithin(0.0).of(0.0); in assertStatsApproxEqual()
386 assertThat(actualStats.min()).isWithin(ALLOWED_ERROR).of(expectedStats.min()); in assertStatsApproxEqual()
387 assertThat(actualStats.max()).isWithin(ALLOWED_ERROR).of(expectedStats.max()); in assertStatsApproxEqual()
389 assertThat(actualStats.mean()).isWithin(ALLOWED_ERROR).of(expectedStats.mean()); in assertStatsApproxEqual()
391 .isWithin(ALLOWED_ERROR) in assertStatsApproxEqual()
393 assertThat(actualStats.min()).isWithin(ALLOWED_ERROR).of(expectedStats.min()); in assertStatsApproxEqual()
394 assertThat(actualStats.max()).isWithin(ALLOWED_ERROR).of(expectedStats.max()); in assertStatsApproxEqual()
413 assertThat(transformation.transform(x1)).isWithin(ALLOWED_ERROR).of(y1); in assertDiagonalLinearTransformation()
414 assertThat(transformation.transform(x1 + xDelta)).isWithin(ALLOWED_ERROR).of(y1 + yDelta); in assertDiagonalLinearTransformation()
[all …]
DPairedStatsTest.java95 assertThat(ONE_VALUE_PAIRED_STATS.populationCovariance()).isWithin(0.0).of(0.0); in testPopulationCovariance()
100 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
112 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
117 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
119 assertThat(VERTICAL_VALUES_PAIRED_STATS.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance()
120 assertThat(CONSTANT_VALUES_PAIRED_STATS.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance()
135 .isWithin(ALLOWED_ERROR) in testSampleCovariance()
138 .isWithin(ALLOWED_ERROR) in testSampleCovariance()
140 assertThat(HORIZONTAL_VALUES_PAIRED_STATS.sampleCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testSampleCovariance()
141 assertThat(VERTICAL_VALUES_PAIRED_STATS.sampleCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testSampleCovariance()
[all …]
DQuantilesTest.java127 .isWithin(ALLOWED_ERROR) in testMedian_compute_doubleCollection()
133 assertThat(median().computeInPlace(dataset)).isWithin(ALLOWED_ERROR).of(SIXTEEN_SQUARES_MEDIAN); in testMedian_computeInPlace()
139 .isWithin(ALLOWED_ERROR) in testQuartiles_index_compute_doubleCollection()
146 .isWithin(ALLOWED_ERROR) in testQuartiles_index_computeInPlace()
169 .isWithin(ALLOWED_ERROR) in testScale_index_compute_doubleCollection()
175 .isWithin(ALLOWED_ERROR) in testScale_index_compute_longCollection()
181 .isWithin(ALLOWED_ERROR) in testScale_index_compute_integerCollection()
188 .isWithin(ALLOWED_ERROR) in testScale_index_compute_doubleVarargs()
199 .isWithin(ALLOWED_ERROR) in testScale_index_compute_longVarargs()
207 .isWithin(ALLOWED_ERROR) in testScale_index_compute_intVarargs()
[all …]
DQuantilesAlgorithmTest.java58 .isWithin(ALLOWED_ERROR) in testSingleQuantile_median()
68 .isWithin(ALLOWED_ERROR) in testSingleQuantile_percentile99()
84 .isWithin(ALLOWED_ERROR) in testMultipleQuantile()
DLinearTransformationTest.java169 assertThat(transformation.slope()).isWithin(ALLOWED_ERROR).of(slope); in testMappingWithSlope_minimalSlope()
181 assertThat(transformation.slope()).isWithin(ALLOWED_ERROR).of(slope); in testMappingWithSlope_maximalSlope()
/external/guava/android/guava-tests/test/com/google/common/math/
DStatsAccumulatorTest.java206 assertThat(oneValueAccumulator.mean()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); in testMean()
207 assertThat(oneValueAccumulatorByAddAllEmptyStats.mean()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); in testMean()
208 assertThat(twoValuesAccumulator.mean()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN); in testMean()
210 .isWithin(ALLOWED_ERROR) in testMean()
213 .isWithin(ALLOWED_ERROR) in testMean()
216 .isWithin(ALLOWED_ERROR) in testMean()
219 .isWithin(ALLOWED_ERROR) in testMean()
222 .isWithin(ALLOWED_ERROR) in testMean()
225 .isWithin(ALLOWED_ERROR) in testMean()
228 .isWithin(ALLOWED_ERROR) in testMean()
[all …]
DStatsTest.java117 assertThat(ONE_VALUE_STATS.mean()).isWithin(ALLOWED_ERROR).of(ONE_VALUE); in testMean()
121 assertThat(TWO_VALUES_STATS.mean()).isWithin(ALLOWED_ERROR).of(TWO_VALUES_MEAN); in testMean()
137 .isWithin(ALLOWED_ERROR) in testMean()
141 assertThat(MANY_VALUES_STATS_ITERABLE.mean()).isWithin(ALLOWED_ERROR).of(MANY_VALUES_MEAN); in testMean()
142 assertThat(MANY_VALUES_STATS_ITERATOR.mean()).isWithin(ALLOWED_ERROR).of(MANY_VALUES_MEAN); in testMean()
143 assertThat(MANY_VALUES_STATS_SNAPSHOT.mean()).isWithin(ALLOWED_ERROR).of(MANY_VALUES_MEAN); in testMean()
145 .isWithin(ALLOWED_ERROR * Double.MAX_VALUE) in testMean()
148 .isWithin(ALLOWED_ERROR * INTEGER_MANY_VALUES_MEAN) in testMean()
151 .isWithin(ALLOWED_ERROR * INTEGER_MANY_VALUES_MEAN) in testMean()
154 .isWithin(ALLOWED_ERROR * Integer.MAX_VALUE) in testMean()
[all …]
DPairedStatsAccumulatorTest.java187 assertThat(oneValueAccumulator.populationCovariance()).isWithin(0.0).of(0.0); in testPopulationCovariance()
189 .isWithin(0.0) in testPopulationCovariance()
192 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
195 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
198 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
201 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
221 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
225 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
229 assertThat(horizontalValuesAccumulator.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance()
231 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
[all …]
DStatsTesting.java355 assertThat(actualStats.mean()).isWithin(ALLOWED_ERROR).of(expectedStats.mean()); in assertStatsApproxEqual()
356 assertThat(actualStats.populationVariance()).isWithin(0.0).of(0.0); in assertStatsApproxEqual()
357 assertThat(actualStats.min()).isWithin(ALLOWED_ERROR).of(expectedStats.min()); in assertStatsApproxEqual()
358 assertThat(actualStats.max()).isWithin(ALLOWED_ERROR).of(expectedStats.max()); in assertStatsApproxEqual()
360 assertThat(actualStats.mean()).isWithin(ALLOWED_ERROR).of(expectedStats.mean()); in assertStatsApproxEqual()
362 .isWithin(ALLOWED_ERROR) in assertStatsApproxEqual()
364 assertThat(actualStats.min()).isWithin(ALLOWED_ERROR).of(expectedStats.min()); in assertStatsApproxEqual()
365 assertThat(actualStats.max()).isWithin(ALLOWED_ERROR).of(expectedStats.max()); in assertStatsApproxEqual()
384 assertThat(transformation.transform(x1)).isWithin(ALLOWED_ERROR).of(y1); in assertDiagonalLinearTransformation()
385 assertThat(transformation.transform(x1 + xDelta)).isWithin(ALLOWED_ERROR).of(y1 + yDelta); in assertDiagonalLinearTransformation()
[all …]
DPairedStatsTest.java95 assertThat(ONE_VALUE_PAIRED_STATS.populationCovariance()).isWithin(0.0).of(0.0); in testPopulationCovariance()
100 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
112 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
117 .isWithin(ALLOWED_ERROR) in testPopulationCovariance()
119 assertThat(VERTICAL_VALUES_PAIRED_STATS.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance()
120 assertThat(CONSTANT_VALUES_PAIRED_STATS.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance()
135 .isWithin(ALLOWED_ERROR) in testSampleCovariance()
138 .isWithin(ALLOWED_ERROR) in testSampleCovariance()
140 assertThat(HORIZONTAL_VALUES_PAIRED_STATS.sampleCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testSampleCovariance()
141 assertThat(VERTICAL_VALUES_PAIRED_STATS.sampleCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testSampleCovariance()
[all …]
DQuantilesTest.java127 .isWithin(ALLOWED_ERROR) in testMedian_compute_doubleCollection()
133 assertThat(median().computeInPlace(dataset)).isWithin(ALLOWED_ERROR).of(SIXTEEN_SQUARES_MEDIAN); in testMedian_computeInPlace()
139 .isWithin(ALLOWED_ERROR) in testQuartiles_index_compute_doubleCollection()
146 .isWithin(ALLOWED_ERROR) in testQuartiles_index_computeInPlace()
169 .isWithin(ALLOWED_ERROR) in testScale_index_compute_doubleCollection()
175 .isWithin(ALLOWED_ERROR) in testScale_index_compute_longCollection()
181 .isWithin(ALLOWED_ERROR) in testScale_index_compute_integerCollection()
188 .isWithin(ALLOWED_ERROR) in testScale_index_compute_doubleVarargs()
199 .isWithin(ALLOWED_ERROR) in testScale_index_compute_longVarargs()
207 .isWithin(ALLOWED_ERROR) in testScale_index_compute_intVarargs()
[all …]
DQuantilesAlgorithmTest.java58 .isWithin(ALLOWED_ERROR) in testSingleQuantile_median()
68 .isWithin(ALLOWED_ERROR) in testSingleQuantile_percentile99()
84 .isWithin(ALLOWED_ERROR) in testMultipleQuantile()
DLinearTransformationTest.java169 assertThat(transformation.slope()).isWithin(ALLOWED_ERROR).of(slope); in testMappingWithSlope_minimalSlope()
181 assertThat(transformation.slope()).isWithin(ALLOWED_ERROR).of(slope); in testMappingWithSlope_maximalSlope()
/external/exoplayer/tree/library/ui/src/test/java/com/google/android/exoplayer2/ui/spherical/
DTouchTrackerTest.java65 assertThat(yaw).isWithin(EPSILON).of(0); in tap()
66 assertThat(pitch).isWithin(EPSILON).of(0); in tap()
72 assertThat(yaw).isWithin(EPSILON).of(-SWIPE_PX / PX_PER_DEGREES); in basicYaw()
73 assertThat(pitch).isWithin(EPSILON).of(0); in basicYaw()
80 assertThat(pitch).isWithin(EPSILON).of(0); in bigYaw()
86 assertThat(yaw).isWithin(EPSILON).of(0); in yawUnaffectedByPitch()
89 assertThat(yaw).isWithin(EPSILON).of(-SWIPE_PX / PX_PER_DEGREES); in yawUnaffectedByPitch()
95 assertThat(yaw).isWithin(EPSILON).of(0); in basicPitch()
96 assertThat(pitch).isWithin(EPSILON).of(SWIPE_PX / PX_PER_DEGREES); in basicPitch()
103 assertThat(yaw).isWithin(EPSILON).of(0); in pitchClipped()
[all …]
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/stats/
DStatsTestUtil.java110 assertThat(((SumDataDouble) actual).getSum()).isWithin(tolerance).of(arg.getSum()); in assertAggregationDataEquals()
143 .isWithin(tolerance) in assertAggregationDataEquals()
162 .isWithin(tolerance) in assertAggregationDataEquals()
188 assertThat(actual.getMean()).isWithin(tolerance).of(expected.getMean()); in assertDistributionDataEquals()
190 assertThat(actual.getMean()).isWithin(tolerance).of(expected.getMean()); in assertDistributionDataEquals()
192 .isWithin(tolerance) in assertDistributionDataEquals()
200 assertThat(actual.getMax()).isWithin(tolerance).of(expected.getMax()); in assertDistributionDataEquals()
201 assertThat(actual.getMin()).isWithin(tolerance).of(expected.getMin()); in assertDistributionDataEquals()
DMutableAggregationTest.java71 assertThat(MutableSumDouble.create().getSum()).isWithin(TOLERANCE).of(0); in testCreateEmpty()
72 assertThat(MutableSumLong.create().getSum()).isWithin(TOLERANCE).of(0); in testCreateEmpty()
74 assertThat(MutableMean.create().getMean()).isWithin(TOLERANCE).of(0); in testCreateEmpty()
80 assertThat(mutableDistribution.getMean()).isWithin(TOLERANCE).of(0); in testCreateEmpty()
84 assertThat(mutableDistribution.getSumOfSquaredDeviations()).isWithin(TOLERANCE).of(0); in testCreateEmpty()
235 assertThat(((MutableSumDouble) combined.get(0)).getSum()).isWithin(TOLERANCE).of(30); in testCombine_SumCountMean()
236 assertThat(((MutableSumLong) combined.get(1)).getSum()).isWithin(TOLERANCE).of(30); in testCombine_SumCountMean()
238 assertThat(((MutableMean) combined.get(3)).getMean()).isWithin(TOLERANCE).of(10); in testCombine_SumCountMean()
330 assertThat(mutableDistribution.getMean()).isWithin(tolerance).of(mean); in verifyMutableDistribution()
332 assertThat(mutableDistribution.getMin()).isWithin(tolerance).of(min); in verifyMutableDistribution()
[all …]
DIntervalBucketTest.java102 assertThat(mutableMean1.getSum()).isWithin(TOLERANCE).of(20); in testRecord()
103 assertThat(mutableMean2.getSum()).isWithin(TOLERANCE).of(10); in testRecord()
114 .isWithin(TOLERANCE) in testGetFraction()
/external/opencensus-java/api/src/test/java/io/opencensus/metrics/export/
DSummaryTest.java41 assertThat(valueAtPercentile.getPercentile()).isWithin(TOLERANCE).of(99.5); in createAndGet_ValueAtPercentile()
42 assertThat(valueAtPercentile.getValue()).isWithin(TOLERANCE).of(10.2); in createAndGet_ValueAtPercentile()
65 assertThat(snapshot.getSum()).isWithin(TOLERANCE).of(87.07); in createAndGet_Snapshot()
123 assertThat(summary.getSum()).isWithin(TOLERANCE).of(6.6); in createAndGet_Summary()
DDistributionTest.java75 assertThat(exemplar.getValue()).isWithin(TOLERANCE).of(-9.9); in createAndGet_Exemplar()
156 assertThat(distribution.getSum()).isWithin(TOLERANCE).of(6.6); in createAndGet_Distribution()
157 assertThat(distribution.getSumOfSquaredDeviations()).isWithin(TOLERANCE).of(678.54); in createAndGet_Distribution()
/external/autotest/client/common_lib/cros/webrtc_scripts/
Dloopback-peerconnection.js82 if (!isWithin(
84 !isWithin(
177 function isWithin(actual, expected, delta) { function
/external/opencensus-java/api/src/test/java/io/opencensus/stats/
DAggregationDataTest.java59 assertThat(distributionData.getMean()).isWithin(TOLERANCE).of(7.7); in testCreateDistributionData()
61 assertThat(distributionData.getMin()).isWithin(TOLERANCE).of(1.1); in testCreateDistributionData()
62 assertThat(distributionData.getMax()).isWithin(TOLERANCE).of(9.9); in testCreateDistributionData()
63 assertThat(distributionData.getSumOfSquaredDeviations()).isWithin(TOLERANCE).of(32.2); in testCreateDistributionData()
/external/exoplayer/tree/testutils/src/test/java/com/google/android/exoplayer2/testutil/
DFakeAdaptiveDataSetTest.java102 assertThat(relativePercentStdDev).isWithin(0.02).of(expectedStdDev); in testAdaptiveDataSetChunkSizeDistribution()
103 assertThat(mean * 8 / TEST_FORMATS[i].bitrate).isWithin(0.01).of(1.0); in testAdaptiveDataSetChunkSizeDistribution()

12