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
@@ -16,9 +16,8 @@
|
||||
#include "main.h"
|
||||
#include <Eigen/Dense>
|
||||
|
||||
template<typename MatrixType>
|
||||
void dontalign(const MatrixType& m)
|
||||
{
|
||||
template <typename MatrixType>
|
||||
void dontalign(const MatrixType& m) {
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, 1> VectorType;
|
||||
typedef Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime> SquareMatrixType;
|
||||
@@ -26,14 +25,14 @@ void dontalign(const MatrixType& m)
|
||||
Index rows = m.rows();
|
||||
Index cols = m.cols();
|
||||
|
||||
MatrixType a = MatrixType::Random(rows,cols);
|
||||
SquareMatrixType square = SquareMatrixType::Random(rows,rows);
|
||||
MatrixType a = MatrixType::Random(rows, cols);
|
||||
SquareMatrixType square = SquareMatrixType::Random(rows, rows);
|
||||
VectorType v = VectorType::Random(rows);
|
||||
|
||||
VERIFY_IS_APPROX(v, square * square.colPivHouseholderQr().solve(v));
|
||||
square = square.inverse().eval();
|
||||
a = square * a;
|
||||
square = square*square;
|
||||
square = square * square;
|
||||
v = square * v;
|
||||
v = a.adjoint() * v;
|
||||
VERIFY(square.determinant() != Scalar(0));
|
||||
@@ -44,8 +43,7 @@ void dontalign(const MatrixType& m)
|
||||
internal::aligned_delete(array, rows);
|
||||
}
|
||||
|
||||
EIGEN_DECLARE_TEST(dontalign)
|
||||
{
|
||||
EIGEN_DECLARE_TEST(dontalign) {
|
||||
#if defined EIGEN_TEST_PART_1 || defined EIGEN_TEST_PART_5
|
||||
dontalign(Matrix3d());
|
||||
dontalign(Matrix4f());
|
||||
|
||||
Reference in New Issue
Block a user