Added array() to ArrayBase and matrix() to MatrixBase().

This commit is contained in:
Hauke Heibel 2010-01-21 17:55:09 +01:00
parent dbf3af866e
commit f1a025185a
2 changed files with 6 additions and 0 deletions

View File

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

View File

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