mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix linear vectorized transversal in linspace (fixes bug #526).
(transplanted from b4f6aec195
)
This commit is contained in:
@@ -91,6 +91,12 @@ void testVectorType(const VectorType& base)
|
||||
scalar.setLinSpaced(1,low,high);
|
||||
VERIFY_IS_APPROX( scalar, ScalarMatrix::Constant(high) );
|
||||
VERIFY_IS_APPROX( ScalarMatrix::LinSpaced(1,low,high), ScalarMatrix::Constant(high) );
|
||||
|
||||
// regression test for bug 526 (linear vectorized transversal)
|
||||
if (size > 1) {
|
||||
m.tail(size-1).setLinSpaced(low, high);
|
||||
VERIFY_IS_APPROX(m(size-1), high);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename MatrixType>
|
||||
|
||||
Reference in New Issue
Block a user