mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add VERIFY_IS_UNITARY
This commit is contained in:
@@ -153,6 +153,8 @@ namespace Eigen
|
||||
#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_UNITARY(a) VERIFY(test_isUnitary(a))
|
||||
|
||||
#define CALL_SUBTEST(FUNC) do { \
|
||||
g_test_stack.push_back(EI_PP_MAKE_STRING(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>());
|
||||
}
|
||||
|
||||
template<typename Derived>
|
||||
inline bool test_isUnitary(const MatrixBase<Derived>& m)
|
||||
{
|
||||
return m.isUnitary(test_precision<typename ei_traits<Derived>::Scalar>());
|
||||
}
|
||||
|
||||
template<typename MatrixType>
|
||||
void createRandomMatrixOfRank(int desired_rank, int rows, int cols, MatrixType& m)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user