fix broken asserts

This commit is contained in:
Erik Schultheis 2021-12-19 17:21:52 +02:00 committed by Rasmus Munk Larsen
parent 0b58738938
commit 5a0a165c09

View File

@ -162,13 +162,13 @@ class IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,UpL
}
/** \returns the sparse lower triangular factor L */
const FactorType& matrixL() const { eigen_assert("m_factorizationIsOk"); return m_L; }
const FactorType& matrixL() const { eigen_assert(m_factorizationIsOk && "factorize() should be called first"); return m_L; }
/** \returns a vector representing the scaling factor S */
const VectorRx& scalingS() const { eigen_assert("m_factorizationIsOk"); return m_scale; }
const VectorRx& scalingS() const { eigen_assert(m_factorizationIsOk && "factorize() should be called first"); return m_scale; }
/** \returns the fill-in reducing permutation P (can be empty for a natural ordering) */
const PermutationType& permutationP() const { eigen_assert("m_analysisIsOk"); return m_perm; }
const PermutationType& permutationP() const { eigen_assert(m_analysisIsOk && "analyzePattern() should be called first"); return m_perm; }
protected:
FactorType m_L; // The lower part stored in CSC