- 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:
Benoit Jacob
2008-01-05 10:57:14 +00:00
parent 23ffede3d0
commit d1d55e67e9
33 changed files with 354 additions and 84 deletions

View File

@@ -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);