8 #include <robottestingframework/TestAssert.h>
28 const double *thresholds,
31 return isApproxEqual(left, right, thresholds, thresholds, length);
36 const double *l_thresholds,
37 const double *h_thresholds,
41 for(
int j = 0; j < length; j++)
43 if (left[j]<(right[j]-fabs(l_thresholds[j])) || left[j]>(right[j]+fabs(h_thresholds[j]))) {
56 ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(
"yarp::robottestingframework::TestAsserter::isApproxEqual : vectors must have same size!");
59 return isApproxEqual(left.
data(), right.
data(), thresholds.
data(), left.
size());
68 if (left >= right - fabs(l_th) && left <= right + fabs(h_th)) {
contains the definition of a Vector type
static bool isApproxEqual(const double *left, const double *right, const double *l_thresholds, const double *h_thresholds, int length)
Element-wise compare two vectors to determine if they are approximately equal, according to asymmetri...
T * data()
Return a pointer to the first element of the vector.