mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -9,23 +9,21 @@
|
||||
|
||||
#include "matrix_functions.h"
|
||||
|
||||
template<typename MatrixType>
|
||||
void testMatrixSqrt(const MatrixType& m)
|
||||
{
|
||||
template <typename MatrixType>
|
||||
void testMatrixSqrt(const MatrixType& m) {
|
||||
MatrixType A;
|
||||
generateTestMatrix<MatrixType>::run(A, m.rows());
|
||||
MatrixType sqrtA = A.sqrt();
|
||||
VERIFY_IS_APPROX(sqrtA * sqrtA, A);
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(matrix_square_root)
|
||||
{
|
||||
EIGEN_DECLARE_TEST(matrix_square_root) {
|
||||
for (int i = 0; i < g_repeat; i++) {
|
||||
CALL_SUBTEST_1(testMatrixSqrt(Matrix3cf()));
|
||||
CALL_SUBTEST_2(testMatrixSqrt(MatrixXcd(12,12)));
|
||||
CALL_SUBTEST_2(testMatrixSqrt(MatrixXcd(12, 12)));
|
||||
CALL_SUBTEST_3(testMatrixSqrt(Matrix4f()));
|
||||
CALL_SUBTEST_4(testMatrixSqrt(Matrix<double,Dynamic,Dynamic,RowMajor>(9, 9)));
|
||||
CALL_SUBTEST_5(testMatrixSqrt(Matrix<float,1,1>()));
|
||||
CALL_SUBTEST_5(testMatrixSqrt(Matrix<std::complex<float>,1,1>()));
|
||||
CALL_SUBTEST_4(testMatrixSqrt(Matrix<double, Dynamic, Dynamic, RowMajor>(9, 9)));
|
||||
CALL_SUBTEST_5(testMatrixSqrt(Matrix<float, 1, 1>()));
|
||||
CALL_SUBTEST_5(testMatrixSqrt(Matrix<std::complex<float>, 1, 1>()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user