mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
- make MatrixBase and all expressions aware of their preferred traversal order.
Honor this preference in operator=. - add several methods to the API - rework API for diagonal matrices - add benchmarking code
This commit is contained in:
@@ -46,7 +46,7 @@ template<typename MatrixType> void miscMatrices(const MatrixType& m)
|
||||
VectorType v1 = VectorType::random(rows);
|
||||
v1[0];
|
||||
Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
|
||||
square = MatrixType::diagonal(v1);
|
||||
square = v1.asDiagonal();
|
||||
if(r==r2) VERIFY_IS_APPROX(square(r,r2), v1[r]);
|
||||
else VERIFY_IS_MUCH_SMALLER_THAN(square(r,r2), static_cast<Scalar>(1));
|
||||
square = MatrixType::zero(rows, rows);
|
||||
|
||||
Reference in New Issue
Block a user