aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-01-21 17:55:09 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-01-21 17:55:09 +0100
commitf1a025185a25e53eb1c4817141c0523cf48f70bc (patch)
tree53882eb18e215b4c198e7c54a16cb9a59c45ecb8 /Eigen
parentdbf3af866e659b88d8bcbd0ab31fdbd30c731b62 (diff)
Added array() to ArrayBase and matrix() to MatrixBase().
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Array/ArrayBase.h3
-rw-r--r--Eigen/src/Core/MatrixBase.h3
2 files changed, 6 insertions, 0 deletions
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<typename Derived> class ArrayBase
Derived& operator/=(const ArrayBase<OtherDerived>& other);
public:
+ ArrayBase<Derived>& array() { return *this; }
+ const ArrayBase<Derived>& array() const { return *this; }
+
MatrixWrapper<Derived> matrix() { return derived(); }
const MatrixWrapper<Derived> 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<typename Derived> class MatrixBase
template<int p> RealScalar lpNorm() const;
+ MatrixBase<Derived>& matrix() { return *this; }
+ const MatrixBase<Derived>& matrix() const { return *this; }
+
ArrayWrapper<Derived> array() { return derived(); }
const ArrayWrapper<Derived> array() const { return derived(); }