Clang-format tests, examples, libraries, benchmarks, etc.

This commit is contained in:
Antonio Sánchez
2023-12-05 21:22:55 +00:00
committed by Rasmus Munk Larsen
parent 3252ecc7a4
commit 46e9cdb7fe
876 changed files with 33453 additions and 37795 deletions

View File

@@ -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>()));
}
}