From f1a025185a25e53eb1c4817141c0523cf48f70bc Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Thu, 21 Jan 2010 17:55:09 +0100 Subject: Added array() to ArrayBase and matrix() to MatrixBase(). --- Eigen/src/Array/ArrayBase.h | 3 +++ Eigen/src/Core/MatrixBase.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'Eigen') diff --git a/Eigen/src/Array/ArrayBase.h b/Eigen/src/Array/ArrayBase.h index 0effa2e2d..21f6fefb1 100644 --- a/Eigen/src/Array/ArrayBase.h +++ b/Eigen/src/Array/ArrayBase.h @@ -149,6 +149,9 @@ template class ArrayBase Derived& operator/=(const ArrayBase& other); public: + ArrayBase& array() { return *this; } + const ArrayBase& array() const { return *this; } + MatrixWrapper matrix() { return derived(); } const MatrixWrapper matrix() const { return derived(); } diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 81c7cef0d..3f1f2a6b9 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -291,6 +291,9 @@ template class MatrixBase template RealScalar lpNorm() const; + MatrixBase& matrix() { return *this; } + const MatrixBase& matrix() const { return *this; } + ArrayWrapper array() { return derived(); } const ArrayWrapper array() const { return derived(); } -- cgit v1.2.3