mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
Make FullPivLU use conjugateIf<>
This commit is contained in:
parent
bba2f05064
commit
be05d0030d
@ -815,29 +815,19 @@ void FullPivLU<_MatrixType>::_solve_impl_transposed(const RhsType &rhs, DstType
|
|||||||
// Step 1
|
// Step 1
|
||||||
c = permutationQ().inverse() * rhs;
|
c = permutationQ().inverse() * rhs;
|
||||||
|
|
||||||
if (Conjugate) {
|
// Step 2
|
||||||
// Step 2
|
m_lu.topLeftCorner(nonzero_pivots, nonzero_pivots)
|
||||||
m_lu.topLeftCorner(nonzero_pivots, nonzero_pivots)
|
.template triangularView<Upper>()
|
||||||
.template triangularView<Upper>()
|
.transpose()
|
||||||
.adjoint()
|
.template conjugateIf<Conjugate>()
|
||||||
.solveInPlace(c.topRows(nonzero_pivots));
|
.solveInPlace(c.topRows(nonzero_pivots));
|
||||||
// Step 3
|
|
||||||
m_lu.topLeftCorner(smalldim, smalldim)
|
// Step 3
|
||||||
.template triangularView<UnitLower>()
|
m_lu.topLeftCorner(smalldim, smalldim)
|
||||||
.adjoint()
|
.template triangularView<UnitLower>()
|
||||||
.solveInPlace(c.topRows(smalldim));
|
.transpose()
|
||||||
} else {
|
.template conjugateIf<Conjugate>()
|
||||||
// Step 2
|
.solveInPlace(c.topRows(smalldim));
|
||||||
m_lu.topLeftCorner(nonzero_pivots, nonzero_pivots)
|
|
||||||
.template triangularView<Upper>()
|
|
||||||
.transpose()
|
|
||||||
.solveInPlace(c.topRows(nonzero_pivots));
|
|
||||||
// Step 3
|
|
||||||
m_lu.topLeftCorner(smalldim, smalldim)
|
|
||||||
.template triangularView<UnitLower>()
|
|
||||||
.transpose()
|
|
||||||
.solveInPlace(c.topRows(smalldim));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 4
|
// Step 4
|
||||||
PermutationPType invp = permutationP().inverse().eval();
|
PermutationPType invp = permutationP().inverse().eval();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user