add VERIFY_IS_UNITARY

This commit is contained in:
Benoit Jacob 2009-08-31 22:08:43 -04:00
parent a16599751f
commit 5339db6164

View File

@ -153,6 +153,8 @@ namespace Eigen
#define VERIFY_IS_APPROX_OR_LESS_THAN(a, b) VERIFY(test_ei_isApproxOrLessThan(a, b)) #define VERIFY_IS_APPROX_OR_LESS_THAN(a, b) VERIFY(test_ei_isApproxOrLessThan(a, b))
#define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b) VERIFY(!test_ei_isApproxOrLessThan(a, b)) #define VERIFY_IS_NOT_APPROX_OR_LESS_THAN(a, b) VERIFY(!test_ei_isApproxOrLessThan(a, b))
#define VERIFY_IS_UNITARY(a) VERIFY(test_isUnitary(a))
#define CALL_SUBTEST(FUNC) do { \ #define CALL_SUBTEST(FUNC) do { \
g_test_stack.push_back(EI_PP_MAKE_STRING(FUNC)); \ g_test_stack.push_back(EI_PP_MAKE_STRING(FUNC)); \
FUNC; \ FUNC; \
@ -227,6 +229,12 @@ inline bool test_ei_isMuchSmallerThan(const MatrixBase<Derived>& m,
return m.isMuchSmallerThan(s, test_precision<typename ei_traits<Derived>::Scalar>()); return m.isMuchSmallerThan(s, test_precision<typename ei_traits<Derived>::Scalar>());
} }
template<typename Derived>
inline bool test_isUnitary(const MatrixBase<Derived>& m)
{
return m.isUnitary(test_precision<typename ei_traits<Derived>::Scalar>());
}
template<typename MatrixType> template<typename MatrixType>
void createRandomMatrixOfRank(int desired_rank, int rows, int cols, MatrixType& m) void createRandomMatrixOfRank(int desired_rank, int rows, int cols, MatrixType& m)
{ {