mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
new implementation of diagonal matrices and diagonal matrix expressions
This commit is contained in:
@@ -43,7 +43,7 @@ template<typename MatrixType> void miscMatrices(const MatrixType& m)
|
||||
VectorType v1 = VectorType::Random(rows);
|
||||
v1[0];
|
||||
Matrix<Scalar, MatrixType::RowsAtCompileTime, MatrixType::RowsAtCompileTime>
|
||||
square = v1.asDiagonal();
|
||||
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