/external/chromium-trace/catapult/telemetry/telemetry/util/ |
H A D | rgba_color.py | 15 def IsEqual(self, expected_color, tolerance=0): 16 """Verifies that the color is within a given tolerance of 22 return (r_diff <= tolerance and g_diff <= tolerance 23 and b_diff <= tolerance and a_diff <= tolerance) 25 def AssertIsRGB(self, r, g, b, tolerance=0): 26 assert self.IsEqual(RgbaColor(r, g, b), tolerance) 28 def AssertIsRGBA(self, r, g, b, a, tolerance=0): 29 assert self.IsEqual(RgbaColor(r, g, b, a), tolerance) [all...] |
H A D | image_util.py | 84 def AreEqual(image1, image2, tolerance=0, likely_equal=True): 85 """Determines whether two images are identical within a given tolerance. 89 return impl.AreEqual(image1, image2, tolerance, likely_equal) 96 def GetBoundingBox(image, color, tolerance=0): 103 tolerance: int, per-channel tolerance for the bounding box color. 107 return impl.GetBoundingBox(image, color, tolerance) 113 def GetColorHistogram(image, ignore_color=None, tolerance=0): 117 tolerance: A tolerance fo [all...] |
/external/chromium-trace/catapult/telemetry/telemetry/internal/image_processing/ |
H A D | image_util_bitmap_impl.py | 37 def AreEqual(bitmap1, bitmap2, tolerance, _): 38 return bitmap1.IsEqual(bitmap2, tolerance) 43 def GetBoundingBox(bitmap, color, tolerance): 44 return bitmap.GetBoundingBox(color, tolerance) 49 def GetColorHistogram(bitmap, ignore_color, tolerance): 50 return bitmap.ColorHistogram(ignore_color, tolerance)
|
H A D | cv_util.py | 13 def AreLinesOrthogonal(line1, line2, tolerance): 14 """Returns true if lines are within tolerance radians of being orthogonal.""" 23 # If the difference between the angles is more than pi/2 - tolerance, the 25 return not abs(angle2 - (np.pi / 2.0)) > tolerance 69 def IsPointApproxOnLine(point, line, tolerance=1): 71 the determinant and checks whether it's within the tolerance. Tolerance is 76 tolerance = float(tolerance) * (abs(xd) + abs(yd)) 77 return abs(det) * 2.0 <= tolerance
|
H A D | bitmaptools.cc | 153 int tolerance) { 155 return (abs(pixel1[0] - pixel2[0]) <= tolerance) && 156 (abs(pixel1[1] - pixel2[1]) <= tolerance) && 157 (abs(pixel1[2] - pixel2[2]) <= tolerance); 162 bool PixelsEqual(const unsigned char* pixel, int color, int tolerance) { argument 164 return PixelsEqual(pixel, pixel2, tolerance); 171 int tolerance; local 172 if (!(ReadInt(&ignore_color) && ReadInt(&tolerance))) { 184 if (ignore_color >= 0 && PixelsEqual(pixel, ignore_color, tolerance)) 200 int tolerance; local 152 PixelsEqual(const unsigned char* pixel1, const unsigned char* pixel2, int tolerance) argument [all...] |
H A D | image_util_numpy_impl.py | 83 def AreEqual(image1, image2, tolerance, likely_equal): 88 if tolerance: 90 return np.amax(_SimpleDiff(image1, image2)) <= tolerance 93 if np.amax(_SimpleDiff(image1[row], image2[row])) > tolerance: 119 def GetBoundingBox(image, color, tolerance): 122 img = cv2.inRange(image, np.subtract(color[0:3], tolerance), 123 np.add(color[0:3], tolerance)) 131 if tolerance: 133 colorm = color - tolerance 134 colorp = color + tolerance [all...] |
H A D | _bitmap.py | 65 def Histogram(self, ignore_color, tolerance): 68 ignore_color_int, tolerance) 76 def BoundingBox(self, color, tolerance): 78 tolerance) 166 def IsEqual(self, other, tolerance=0): 172 if tolerance or self.bpp != other.bpp: 177 if not c0.IsEqual(c1, tolerance): 224 def GetBoundingBox(self, color, tolerance=0): 225 return self._PrepareTools().BoundingBox(color, tolerance) 239 def ColorHistogram(self, ignore_color=None, tolerance [all...] |
/external/skia/src/gpu/ |
H A D | GrTessellator.h | 45 int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds, 48 int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
|
H A D | GrDistanceFieldGenFromVector.cpp | 150 double tolerance = 0.0, 152 SkASSERT(tolerance >= 0.0); 153 double tolB = tolerance; 154 double tolC = tolerance; 164 tolB = tolerance / sqrt(4.0 * b * b + 1.0); 165 tolC = tolerance / sqrt(4.0 * c * c + 1.0); 172 double tolerance = 0.0, 174 SkASSERT(tolerance >= 0.0); 175 double tolB = tolerance; 176 double tolC = tolerance; [all...] |
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/ |
H A D | DoubleMath.java | 112 * Returns {@code true} if {@code a} and {@code b} are within {@code tolerance} of each other. 115 * {@code Math.abs(a - b) <= tolerance || Double.valueOf(a).equals(Double.valueOf(b))}. 122 * <li>If {@code tolerance} is zero, and neither {@code a} nor {@code b} is NaN, then 124 * <li>With {@link Double#POSITIVE_INFINITY} tolerance, all non-NaN values are fuzzily equal. 125 * <li>With finite tolerance, {@code Double.POSITIVE_INFINITY} and {@code 133 * @throws IllegalArgumentException if {@code tolerance} is {@code < 0} or NaN 136 public static boolean fuzzyEquals(double a, double b, double tolerance) { argument 137 MathPreconditions.checkNonNegative("tolerance", tolerance); 139 Math.copySign(a - b, 1.0) <= tolerance 159 fuzzyCompare(double a, double b, double tolerance) argument [all...] |
/external/eigen/Eigen/src/SparseCore/ |
H A D | SparseSparseProductWithPruning.h | 20 static void sparse_sparse_product_with_pruning_impl(const Lhs& lhs, const Rhs& rhs, ResultType& res, const typename ResultType::RealScalar& tolerance) argument 73 for (typename AmbiVector<Scalar,StorageIndex>::Iterator it(tempVector,tolerance); it; ++it) 91 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 94 internal::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,ResultType>(lhs, rhs, _res, tolerance); 103 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 108 internal::sparse_sparse_product_with_pruning_impl<Lhs,Rhs,SparseTemporaryType>(lhs, rhs, _res, tolerance); 117 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 121 internal::sparse_sparse_product_with_pruning_impl<Rhs,Lhs,ResultType>(rhs, lhs, _res, tolerance); 130 static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 136 internal::sparse_sparse_product_with_pruning_impl<ColMajorMatrixLhs,ColMajorMatrixRhs,ResultType>(colLhs, colRhs, res, tolerance); 150 run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 162 run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 174 run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument 186 run(const Lhs& lhs, const Rhs& rhs, ResultType& res, const RealScalar& tolerance) argument [all...] |
/external/autotest/server/site_tests/firmware_TypeCCharging/ |
H A D | firmware_TypeCCharging.py | 55 tolerance = self.VBUS_TOLERANCE * expected_vbus_voltage 61 if math.fabs(expected_vbus_voltage - vbus_voltage) > tolerance: 64 (vbus_voltage, expected_vbus_voltage, tolerance))
|
/external/skia/tests/ |
H A D | ColorMatrixTest.cpp | 19 SkColor expected, SkColor actual, int tolerance) { 20 REPORTER_ASSERT(reporter, abs((int)(SkColorGetA(expected) - SkColorGetA(actual))) <= tolerance); 21 REPORTER_ASSERT(reporter, abs((int)(SkColorGetR(expected) - SkColorGetR(actual))) <= tolerance); 22 REPORTER_ASSERT(reporter, abs((int)(SkColorGetG(expected) - SkColorGetG(actual))) <= tolerance); 23 REPORTER_ASSERT(reporter, abs((int)(SkColorGetB(expected) - SkColorGetB(actual))) <= tolerance); 18 assert_color(skiatest::Reporter* reporter, SkColor expected, SkColor actual, int tolerance) argument
|
/external/droiddriver/src/io/appium/droiddriver/helpers/ |
H A D | BaseDroidDriverTest.java | 232 int tolerance = 1; 234 tolerance = method.getAnnotation(FlakyTest.class).tolerance(); 237 for (int runCount = 0; runCount < tolerance; runCount++) { 239 Logs.logfmt(Log.INFO, "Running %s round %d of %d attempts", fName, runCount + 1, tolerance); 251 if (shouldSkipRemainingTests(exception) || runCount >= tolerance - 1) {
|
/external/protobuf/src/google/protobuf/util/ |
H A D | field_comparator.cc | 184 Tolerance* tolerance = FindOrNull(map_tolerance_, &field); local 185 if (tolerance == NULL && has_default_tolerance_) { 186 tolerance = &default_tolerance_; 188 if (tolerance == NULL) { 195 value_1, value_2, static_cast<T>(tolerance->fraction), 196 static_cast<T>(tolerance->margin));
|
/external/strace/mpers-m32/ |
H A D | struct_timex.h | 13 int32_t tolerance; member in struct:__anon17701
|
/external/strace/mpers-mx32/ |
H A D | struct_timex.h | 15 int64_t tolerance; member in struct:__anon17850
|
/external/webrtc/webrtc/modules/audio_coding/neteq/ |
H A D | audio_decoder_unittest.cc | 43 // compared vs |tolerance|. The parameter |delay| is used to correct for codec 49 int tolerance, 54 ASSERT_NEAR(input[n], output[channels * n + delay], tolerance) 63 // compared vs |tolerance|. 67 int tolerance) { 71 ASSERT_NEAR(output[channels * n], output[channels * n + 1], tolerance) 172 // output is compared vs |tolerance|, and the mean-squared error is compared 176 void EncodeDecodeTest(size_t expected_bytes, int tolerance, double mse, argument 178 ASSERT_GE(tolerance, 0) << "Test must define a tolerance > 45 CompareInputOutput(const std::vector<int16_t>& input, const std::vector<int16_t>& output, size_t num_samples, size_t channels, int tolerance, int delay) argument 64 CompareTwoChannels(const std::vector<int16_t>& output, size_t samples_per_channel, size_t channels, int tolerance) argument 479 int tolerance = 251; local 505 int tolerance = 308; local 517 int tolerance = 0; local 530 int tolerance = 6808; local 544 int tolerance = 3399; local 557 int tolerance = 19757; local 570 int tolerance = 11034; local 590 int tolerance = 6176; local 603 int tolerance = 6176; local 617 int tolerance = 6176; local 640 int tolerance = 6176; local [all...] |
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/solvers/ |
H A D | BrentSolver.java | 331 double tolerance = 333 if (FastMath.abs(dx) <= tolerance) { 337 if ((FastMath.abs(oldDelta) < tolerance) || 365 if (2.0 * p >= 1.5 * dx * p1 - FastMath.abs(tolerance * p1) || 381 if (FastMath.abs(delta) > tolerance) { 384 x1 = x1 + 0.5 * tolerance; 386 x1 = x1 - 0.5 * tolerance;
|
/external/webrtc/webrtc/modules/audio_processing/beamformer/ |
H A D | matrix_test_helpers.h | 81 float tolerance) { 91 tolerance); 94 tolerance); 78 ValidateMatrixNearEqualityComplexFloat( const Matrix<complex<float> >& expected, const Matrix<complex<float> >& actual, float tolerance) argument
|
/external/chromium-trace/catapult/telemetry/third_party/web-page-replay/ |
H A D | trafficshaper_test.py | 135 def assertValuesAlmostEqual(self, expected, actual, tolerance=0.05): 137 assertTrue(expected <= actual + tolerance && 138 expected >= actual - tolerance) 140 delta = tolerance * expected 143 actual, expected, 100 * tolerance)) 198 self.assertValuesAlmostEqual(delay_ms, connect_time, tolerance=0.12) 258 self.assertValuesAlmostEqual(expected_ms, send_ms, tolerance=0.10) 259 self.assertValuesAlmostEqual(expected_ms, receive_ms, tolerance=0.10)
|
H A D | proxyshaper_test.py | 48 def assertValuesAlmostEqual(self, expected, actual, tolerance=0.05): 50 assertTrue(expected <= actual + tolerance && 51 expected >= actual - tolerance) 53 delta = tolerance * expected 56 actual, expected, 100 * tolerance))
|
/external/skia/include/core/ |
H A D | SkScalar.h | 170 SkScalar tolerance = SK_ScalarNearlyZero) { 171 SkASSERT(tolerance >= 0); 172 return SkScalarAbs(x) <= tolerance; 176 SkScalar tolerance = SK_ScalarNearlyZero) { 177 SkASSERT(tolerance >= 0); 178 return SkScalarAbs(x-y) <= tolerance;
|
/external/guava/guava-tests/test/com/google/common/math/ |
H A D | DoubleMathTest.java | 549 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { 551 Math.abs(a - b) <= tolerance, 552 DoubleMath.fuzzyEquals(a, b, tolerance)); 561 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { 562 assertFalse(DoubleMath.fuzzyEquals(a, inf, tolerance)); 563 assertFalse(DoubleMath.fuzzyEquals(inf, a, tolerance)); 571 for (double tolerance : FINITE_TOLERANCE_CANDIDATES) { 572 assertTrue(DoubleMath.fuzzyEquals(inf, inf, tolerance)); 573 assertFalse(DoubleMath.fuzzyEquals(inf, -inf, tolerance)); 588 for (double tolerance [all...] |
/external/guava/guava/src/com/google/common/math/ |
H A D | DoubleMath.java | 327 * Returns {@code true} if {@code a} and {@code b} are within {@code tolerance} of each other. 330 * {@code Math.abs(a - b) <= tolerance || Double.valueOf(a).equals(Double.valueOf(b))}. 337 * <li>If {@code tolerance} is zero, and neither {@code a} nor {@code b} is NaN, then 339 * <li>With {@link Double#POSITIVE_INFINITY} tolerance, all non-NaN values are fuzzily equal. 340 * <li>With finite tolerance, {@code Double.POSITIVE_INFINITY} and {@code 348 * @throws IllegalArgumentException if {@code tolerance} is {@code < 0} or NaN 351 public static boolean fuzzyEquals(double a, double b, double tolerance) { argument 352 MathPreconditions.checkNonNegative("tolerance", tolerance); 354 Math.copySign(a - b, 1.0) <= tolerance 374 fuzzyCompare(double a, double b, double tolerance) argument [all...] |