fix broken asserts

(cherry picked from commit 5a0a165c095aa12e5a4f188c56543f33ea546239)
This commit is contained in:
Erik Schultheis 2021-12-19 17:21:52 +02:00 committed by Antonio Sanchez
parent e7248b26a1
commit 770ed0794e

View File

@ -160,13 +160,13 @@ class IncompleteCholesky : public SparseSolverBase<IncompleteCholesky<Scalar,_Up
}
/** \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