diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index b1d801d34..31867f884 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -84,7 +84,13 @@ class LDLT : public SolverBase > { * The default constructor is useful in cases in which the user intends to * perform decompositions via LDLT::compute(const MatrixType&). */ - LDLT() : m_matrix(), m_transpositions(), m_sign(internal::ZeroSign), m_isInitialized(false) {} + LDLT() + : m_matrix(), + m_l1_norm(0), + m_transpositions(), + m_sign(internal::ZeroSign), + m_isInitialized(false), + m_info(InvalidInput) {} /** \brief Default Constructor with memory preallocation * @@ -94,10 +100,12 @@ class LDLT : public SolverBase > { */ explicit LDLT(Index size) : m_matrix(size, size), + m_l1_norm(0), m_transpositions(size), m_temporary(size), m_sign(internal::ZeroSign), - m_isInitialized(false) {} + m_isInitialized(false), + m_info(InvalidInput) {} /** \brief Constructor with decomposition * @@ -108,10 +116,12 @@ class LDLT : public SolverBase > { template explicit LDLT(const EigenBase& matrix) : m_matrix(matrix.rows(), matrix.cols()), + m_l1_norm(0), m_transpositions(matrix.rows()), m_temporary(matrix.rows()), m_sign(internal::ZeroSign), - m_isInitialized(false) { + m_isInitialized(false), + m_info(InvalidInput) { compute(matrix.derived()); } @@ -125,10 +135,12 @@ class LDLT : public SolverBase > { template explicit LDLT(EigenBase& matrix) : m_matrix(matrix.derived()), + m_l1_norm(0), m_transpositions(matrix.rows()), m_temporary(matrix.rows()), m_sign(internal::ZeroSign), - m_isInitialized(false) { + m_isInitialized(false), + m_info(InvalidInput) { compute(matrix.derived()); } diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index 7fa4fa2a0..905503a3b 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -86,7 +86,7 @@ class LLT : public SolverBase > { * The default constructor is useful in cases in which the user intends to * perform decompositions via LLT::compute(const MatrixType&). */ - LLT() : m_matrix(), m_isInitialized(false) {} + LLT() : m_matrix(), m_l1_norm(0), m_isInitialized(false), m_info(InvalidInput) {} /** \brief Default Constructor with memory preallocation * @@ -94,10 +94,11 @@ class LLT : public SolverBase > { * according to the specified problem \a size. * \sa LLT() */ - explicit LLT(Index size) : m_matrix(size, size), m_isInitialized(false) {} + explicit LLT(Index size) : m_matrix(size, size), m_l1_norm(0), m_isInitialized(false), m_info(InvalidInput) {} template - explicit LLT(const EigenBase& matrix) : m_matrix(matrix.rows(), matrix.cols()), m_isInitialized(false) { + explicit LLT(const EigenBase& matrix) + : m_matrix(matrix.rows(), matrix.cols()), m_l1_norm(0), m_isInitialized(false), m_info(InvalidInput) { compute(matrix.derived()); } @@ -109,7 +110,8 @@ class LLT : public SolverBase > { * \sa LLT(const EigenBase&) */ template - explicit LLT(EigenBase& matrix) : m_matrix(matrix.derived()), m_isInitialized(false) { + explicit LLT(EigenBase& matrix) + : m_matrix(matrix.derived()), m_l1_norm(0), m_isInitialized(false), m_info(InvalidInput) { compute(matrix.derived()); } diff --git a/test/array_for_matrix.cpp b/test/array_for_matrix.cpp index e8d2c7d36..42bc6a43e 100644 --- a/test/array_for_matrix.cpp +++ b/test/array_for_matrix.cpp @@ -73,12 +73,12 @@ void array_for_matrix(const MatrixType& m) { VERIFY_IS_EQUAL(m1.block(0, 0, rows, 0).rowwise().prod(), ColVectorType::Ones(rows)); // verify the const accessors exist - const Scalar& ref_m1 = m.matrix().array().coeffRef(0); - const Scalar& ref_m2 = m.matrix().array().coeffRef(0, 0); - const Scalar& ref_a1 = m.array().matrix().coeffRef(0); - const Scalar& ref_a2 = m.array().matrix().coeffRef(0, 0); - VERIFY(&ref_a1 == &ref_m1); - VERIFY(&ref_a2 == &ref_m2); + const Scalar* ptr_m1 = &m.matrix().array().coeffRef(0); + const Scalar* ptr_m2 = &m.matrix().array().coeffRef(0, 0); + const Scalar* ptr_a1 = &m.array().matrix().coeffRef(0); + const Scalar* ptr_a2 = &m.array().matrix().coeffRef(0, 0); + VERIFY(ptr_a1 == ptr_m1); + VERIFY(ptr_a2 == ptr_m2); // Check write accessors: m1.array().coeffRef(0, 0) = 1; diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 12ba95d88..873efb17d 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -1687,10 +1687,6 @@ void packetmath_complex() { CHECK_CWISE1_N(std::log, internal::plog, size); // Test misc. corner cases. - const RealScalar zero = RealScalar(0); - const RealScalar one = RealScalar(1); - const RealScalar inf = std::numeric_limits::infinity(); - const RealScalar nan = std::numeric_limits::quiet_NaN(); for (RealScalar x : {zero, one, inf}) { for (RealScalar y : {zero, one, inf}) { data1[0] = Scalar(x, y);