|
| template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> |
| static bool | close_to (arma::Mat< T > &a, arma::Mat< T > &b, double tol=1e-8) |
| | Test if two armadillo matrices/vectors are close to each other.
|
| |
| template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> |
| static bool | close_to (T a, T b, double tol=1e-8) |
| | Test if two numbers are close to each other.
|
| |
| template<class T , class = typename std::enable_if<std::is_integral<T>::value>::type> |
| static bool | is_equal (arma::Mat< T > &a, arma::Mat< T > &b) |
| | Test if two armadillo matrices/vectors are equal.
|
| |
| template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> |
| static bool | assert_each (std::function< bool(T)> expr, arma::Mat< T > &M) |
| | Test that all elements fulfill the condition.
|
| |
template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type>
| static bool testlib::close_to |
( |
arma::Mat< T > & |
a, |
|
|
arma::Mat< T > & |
b, |
|
|
double |
tol = 1e-8 |
|
) |
| |
|
static |
Test if two armadillo matrices/vectors are close to each other.
This function takes in 2 matrices/vectors and checks if they are approximately equal to each other given a tolerance.
- Parameters
-
| a | Matrix/vector a |
| b | Matrix/vector b |
| tol | The tolerance |
- Returns
- bool
Definition at line 67 of file testlib.hpp.
template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type>
| static bool testlib::close_to |
( |
T |
a, |
|
|
T |
b, |
|
|
double |
tol = 1e-8 |
|
) |
| |
|
static |
Test if two numbers are close to each other.
This function takes in 2 matrices/vectors and checks if they are approximately equal to each other given a tolerance.
- Parameters
-
| a | Matrix/vector a |
| b | Matrix/vector b |
| tol | The tolerance |
- Returns
- bool
Definition at line 94 of file testlib.hpp.
template<class T , class = typename std::enable_if<std::is_integral<T>::value>::type>
| static bool testlib::is_equal |
( |
arma::Mat< T > & |
a, |
|
|
arma::Mat< T > & |
b |
|
) |
| |
|
static |
Test if two armadillo matrices/vectors are equal.
This function takes in 2 matrices/vectors and checks if they are equal to each other. This should only be used for integral types.
- Parameters
-
| a | Matrix/vector a |
| b | Matrix/vector b |
- Returns
- bool
Definition at line 111 of file testlib.hpp.