diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-05-10 16:24:39 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-05-10 16:24:39 +0000 |
commit | 9afd1324fd809631cd0762908629c30d72e61b40 (patch) | |
tree | 3d115110b75b04287c4f869ba757c2da7d5d87e3 /doc | |
parent | eac79b6d2e0a4feeccf7e5936cd972fdc4a74ac7 (diff) |
constant Diagonal ---> DiagonalBits
introduce ei_is_diagonal to check for it
DiagonalCoeffs ---> Diagonal and allow Index to by Dynamic
-> add MatrixBase::diagonal(int) with unittest and doc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/snippets/MatrixBase_diagonal_int.cpp | 4 | ||||
-rw-r--r-- | doc/snippets/MatrixBase_diagonal_template_int.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/snippets/MatrixBase_diagonal_int.cpp b/doc/snippets/MatrixBase_diagonal_int.cpp index 0e73d1c16..7b66abf67 100644 --- a/doc/snippets/MatrixBase_diagonal_int.cpp +++ b/doc/snippets/MatrixBase_diagonal_int.cpp @@ -1,5 +1,5 @@ Matrix4i m = Matrix4i::Random(); cout << "Here is the matrix m:" << endl << m << endl; cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl - << m.diagonal<1>().transpose() << endl - << m.diagonal<-2>().transpose() << endl; + << m.diagonal(1).transpose() << endl + << m.diagonal(-2).transpose() << endl; diff --git a/doc/snippets/MatrixBase_diagonal_template_int.cpp b/doc/snippets/MatrixBase_diagonal_template_int.cpp new file mode 100644 index 000000000..0e73d1c16 --- /dev/null +++ b/doc/snippets/MatrixBase_diagonal_template_int.cpp @@ -0,0 +1,5 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here are the coefficients on the 1st super-diagonal and 2nd sub-diagonal of m:" << endl + << m.diagonal<1>().transpose() << endl + << m.diagonal<-2>().transpose() << endl; |