/external/guava/guava-tests/test/com/google/common/math/ |
D | StatsAccumulatorTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 213 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() [all …]
|
D | StatsTest.java | 20 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 127 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() [all …]
|
D | PairedStatsAccumulatorTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 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() 233 assertThat(verticalValuesAccumulator.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance() [all …]
|
D | StatsTesting.java | 44 static final double ALLOWED_ERROR = 1e-10; field in StatsTesting 384 assertThat(actualStats.mean()).isWithin(ALLOWED_ERROR).of(expectedStats.mean()); 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 …]
|
D | PairedStatsTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 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 …]
|
D | QuantilesTest.java | 78 private static final double ALLOWED_ERROR = 1.0e-10; field in QuantilesTest 85 Correspondence.tolerance(ALLOWED_ERROR); 127 .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() [all …]
|
D | QuantilesAlgorithmTest.java | 37 private static final double ALLOWED_ERROR = 1.0e-10; field in QuantilesAlgorithmTest 58 .isWithin(ALLOWED_ERROR) in testSingleQuantile_median() 68 .isWithin(ALLOWED_ERROR) in testSingleQuantile_percentile99() 84 .isWithin(ALLOWED_ERROR) in testMultipleQuantile()
|
D | LinearTransformationTest.java | 34 private static final double ALLOWED_ERROR = 1e-10; field in LinearTransformationTest 169 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/ |
D | StatsAccumulatorTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 206 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() [all …]
|
D | StatsTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 117 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() [all …]
|
D | PairedStatsAccumulatorTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 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() 233 assertThat(verticalValuesAccumulator.populationCovariance()).isWithin(ALLOWED_ERROR).of(0.0); in testPopulationCovariance() [all …]
|
D | StatsTesting.java | 43 static final double ALLOWED_ERROR = 1e-10; field in StatsTesting 355 assertThat(actualStats.mean()).isWithin(ALLOWED_ERROR).of(expectedStats.mean()); 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 …]
|
D | PairedStatsTest.java | 19 import static com.google.common.math.StatsTesting.ALLOWED_ERROR; 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 …]
|
D | QuantilesTest.java | 78 private static final double ALLOWED_ERROR = 1.0e-10; field in QuantilesTest 85 Correspondence.tolerance(ALLOWED_ERROR); 127 .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() [all …]
|
D | QuantilesAlgorithmTest.java | 37 private static final double ALLOWED_ERROR = 1.0e-10; field in QuantilesAlgorithmTest 58 .isWithin(ALLOWED_ERROR) in testSingleQuantile_median() 68 .isWithin(ALLOWED_ERROR) in testSingleQuantile_percentile99() 84 .isWithin(ALLOWED_ERROR) in testMultipleQuantile()
|
D | LinearTransformationTest.java | 34 private static final double ALLOWED_ERROR = 1e-10; field in LinearTransformationTest 169 assertThat(transformation.slope()).isWithin(ALLOWED_ERROR).of(slope); in testMappingWithSlope_minimalSlope() 181 assertThat(transformation.slope()).isWithin(ALLOWED_ERROR).of(slope); in testMappingWithSlope_maximalSlope()
|
/external/OpenCL-CTS/test_conformance/device_timer/ |
D | test_device_timer.cpp | 25 #define ALLOWED_ERROR 0.005f macro 88 allowedDiff = (cl_ulong)(hostTimeDiff * ALLOWED_ERROR); in test_device_and_host_timers() 92 allowedDiff = (cl_ulong)(deviceTimeDiff * ALLOWED_ERROR); in test_device_and_host_timers()
|
/external/python/cpython2/Lib/test/ |
D | test_math.py | 967 ALLOWED_ERROR = 20 # permitted error, in ulps
|