aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Diagonal.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/Diagonal.h')
-rw-r--r--Eigen/src/Core/Diagonal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h
index e807a49e4..3c9f517d1 100644
--- a/Eigen/src/Core/Diagonal.h
+++ b/Eigen/src/Core/Diagonal.h
@@ -133,6 +133,17 @@ template<typename MatrixType, int DiagIndex> class Diagonal
return m_matrix.coeff(index+rowOffset(), index+colOffset());
}
+ const typename internal::remove_all<typename MatrixType::Nested>::type&
+ nestedExpression() const
+ {
+ return m_matrix;
+ }
+
+ int index() const
+ {
+ return m_index.value();
+ }
+
protected:
const typename MatrixType::Nested m_matrix;
const internal::variable_if_dynamic<Index, DiagIndex> m_index;