mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-25 15:53:19 +08:00
fix compilation of ArrayBase::transposeInPlace
This commit is contained in:
parent
8bbde351e7
commit
c695cbf0fa
@ -160,8 +160,8 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
|||||||
Index cols = m.cols();
|
Index cols = m.cols();
|
||||||
|
|
||||||
ArrayType m1 = ArrayType::Random(rows, cols),
|
ArrayType m1 = ArrayType::Random(rows, cols),
|
||||||
m2 = ArrayType::Random(rows, cols),
|
m2 = ArrayType::Random(rows, cols),
|
||||||
m3(rows, cols);
|
m3(rows, cols);
|
||||||
|
|
||||||
Scalar s1 = internal::random<Scalar>();
|
Scalar s1 = internal::random<Scalar>();
|
||||||
|
|
||||||
@ -211,6 +211,13 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
|||||||
s1 += Scalar(tiny);
|
s1 += Scalar(tiny);
|
||||||
m1 += ArrayType::Constant(rows,cols,Scalar(tiny));
|
m1 += ArrayType::Constant(rows,cols,Scalar(tiny));
|
||||||
VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());
|
VERIFY_IS_APPROX(s1/m1, s1 * m1.inverse());
|
||||||
|
|
||||||
|
// check inplace transpose
|
||||||
|
m3 = m1;
|
||||||
|
m3.transposeInPlace();
|
||||||
|
VERIFY_IS_APPROX(m3,m1.transpose());
|
||||||
|
m3.transposeInPlace();
|
||||||
|
VERIFY_IS_APPROX(m3,m1);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename ArrayType> void array_complex(const ArrayType& m)
|
template<typename ArrayType> void array_complex(const ArrayType& m)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user