MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / _solve

Method _solve

Externals/eigen/Eigen/src/SparseLU/SparseLU.h:222–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220
221 template<typename Rhs, typename Dest>
222 bool _solve(const MatrixBase<Rhs> &B, MatrixBase<Dest> &_X) const
223 {
224 Dest& X(_X.derived());
225 eigen_assert(m_factorizationIsOk && "The matrix should be factorized first");
226 EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,
227 THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
228
229 // Permute the right hand side to form X = Pr*B
230 // on return, X is overwritten by the computed solution
231 X.resize(B.rows(),B.cols());
232 for(Index j = 0; j < B.cols(); ++j)
233 X.col(j) = rowsPermutation() * B.col(j);
234
235 //Forward substitution with L
236 this->matrixL().solveInPlace(X);
237 this->matrixU().solveInPlace(X);
238
239 // Permute back the solution
240 for (Index j = 0; j < B.cols(); ++j)
241 X.col(j) = colsPermutation().inverse() * X.col(j);
242
243 return true;
244 }
245
246 /**
247 * \returns the absolute value of the determinant of the matrix of which

Callers 1

evalToMethod · 0.45

Calls 8

matrixLMethod · 0.95
matrixUMethod · 0.95
resizeMethod · 0.45
rowsMethod · 0.45
colsMethod · 0.45
colMethod · 0.45
solveInPlaceMethod · 0.45
inverseMethod · 0.45

Tested by

no test coverage detected