11 #include <robottestingframework/TestAssert.h>
31 const double *thresholds,
34 return isApproxEqual(left, right, thresholds, thresholds, length);
39 const double *l_thresholds,
40 const double *h_thresholds,
44 for(
int j = 0; j < length; j++)
46 if (left[j]<(right[j]-fabs(l_thresholds[j])) || left[j]>(right[j]+fabs(h_thresholds[j]))) {
59 ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(
"yarp::robottestingframework::TestAsserter::isApproxEqual : vectors must have same size!");
62 return isApproxEqual(left.
data(), right.
data(), thresholds.
data(), left.
size());
71 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.