mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-10-12 16:11:29 +08:00
fix compilation of ArrayBase::transposeInPlace
(transplanted from c21a04bcf978556555f874b780cae14dbdf4827f )
This commit is contained in:
parent
fbe1d5fb2c
commit
2034af6db9
@ -253,7 +253,7 @@ struct inplace_transpose_selector;
|
||||
template<typename MatrixType>
|
||||
struct inplace_transpose_selector<MatrixType,true> { // square matrix
|
||||
static void run(MatrixType& m) {
|
||||
m.template triangularView<StrictlyUpper>().swap(m.transpose());
|
||||
m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose());
|
||||
}
|
||||
};
|
||||
|
||||
@ -261,7 +261,7 @@ template<typename MatrixType>
|
||||
struct inplace_transpose_selector<MatrixType,false> { // non square matrix
|
||||
static void run(MatrixType& m) {
|
||||
if (m.rows()==m.cols())
|
||||
m.template triangularView<StrictlyUpper>().swap(m.transpose());
|
||||
m.matrix().template triangularView<StrictlyUpper>().swap(m.matrix().transpose());
|
||||
else
|
||||
m = m.transpose().eval();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user