#include <NumericTest.h>
Helper functions to compare scalars, vectors, matrices, etc. More...

Helper functions to compare scalars, vectors, matrices, etc.
| Public Member Functions | |
| NumericTest () | |
|  Public Member Functions inherited from sofa::testing::BaseTest | |
| BaseTest () | |
| Initialize Sofa and the random number generator.  More... | |
| ~BaseTest () override | |
| virtual void | doSetUp () | 
| virtual void | doTearDown () | 
| virtual void | onSetUp () | 
| virtual void | onTearDown () | 
| void | loadPlugins (const std::initializer_list< std::string > &pluginNames) | 
| Static Public Member Functions | |
| Matrices | |
| Functions to compare matrices | |
| template<typename Matrix1 , typename Matrix2 > | |
| static Real | matrixMaxDiff (const Matrix1 &m1, const Matrix2 &m2) | 
| return the maximum difference between corresponding entries, or the infinity if the matrices have different sizes  More... | |
| template<Size M, Size N, typename Real , typename Matrix2 > | |
| static Real | matrixMaxDiff (const sofa::type::Mat< M, N, Real > &m1, const Matrix2 &m2) | 
| Return the maximum difference between corresponding entries, or the infinity if the matrices have different sizes.  More... | |
| Static Protected Member Functions | |
| static float | norm (float a) | 
| static double | norm (double a) | 
| template<typename T > | |
| static Real | norm (T a) | 
| Scalars | |
| typedef _Real | Real | 
| Scalar type.  More... | |
| static Real | epsilon () | 
| the smallest real number  More... | |
| static Real | infinity () | 
| Infinity.  More... | |
| static bool | isSmall (Real r, Real ratio=1.) | 
| true if the magnitude of r is less than ratio*epsilon  More... | |
| Vectors | |
| template<class Container1 , class Container2 > | |
| Real | vectorMaxDiff (const Container1 &c1, const Container2 &c2) | 
| Return the maximum difference between two containers. Issues a failure if sizes are different.  More... | |
| template<class Container > | |
| Real | vectorMaxAbs (const Container &c) | 
| Return the maximum absolute value of a container.  More... | |
| template<Size N, typename Real , typename Vector2 > | |
| static Real | vectorMaxDiff (const sofa::type::Vec< N, Real > &m1, const Vector2 &m2) | 
| return the maximum difference between corresponding entries, or the infinity if the vectors have different sizes  More... | |
| template<Size N, typename Real > | |
| static Real | vectorMaxDiff (const sofa::type::Vec< N, Real > &m1, const sofa::type::Vec< N, Real > &m2) | 
| return the maximum difference between corresponding entries  More... | |
| Additional Inherited Members | |
|  Public Attributes inherited from sofa::testing::BaseTest | |
| sofa::testing::MessageAsTestFailure | m_fatal | 
| sofa::testing::MessageAsTestFailure | m_error | 
|  Static Public Attributes inherited from sofa::testing::BaseTest | |
| static int | seed = (unsigned int)time(nullptr) | 
| Seed value.  More... | |
| 
 | inline | 
| 
 | inlinestatic | 
the smallest real number
| 
 | inlinestatic | 
Infinity.
| 
 | inlinestatic | 
true if the magnitude of r is less than ratio*epsilon
| 
 | inlinestatic | 
return the maximum difference between corresponding entries, or the infinity if the matrices have different sizes
| 
 | inlinestatic | 
Return the maximum difference between corresponding entries, or the infinity if the matrices have different sizes.
| 
 | inlinestaticprotected | 
| 
 | inlinestaticprotected | 
| 
 | inlinestaticprotected | 
| 
 | inline | 
Return the maximum absolute value of a container.
| 
 | inline | 
Return the maximum difference between two containers. Issues a failure if sizes are different.
| 
 | inlinestatic | 
return the maximum difference between corresponding entries
| 
 | inlinestatic | 
return the maximum difference between corresponding entries, or the infinity if the vectors have different sizes