aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Matrix.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-01-06 16:35:21 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-01-06 16:35:21 +0000
commit84934ea217eb327ba0e3c357b3c68ab0e22d5160 (patch)
tree517efc9702ac2e448763e45f04e8906e86ebb1d1 /Eigen/src/Core/Matrix.h
parentaaf889e72b005110530fb4252fb0858c2ec733de (diff)
- move: DerivedTraits becomes MatrixBase::Traits
- the static constants are private again in the Derived classes - more documentation and code snippets - new isDiagonal() method
Diffstat (limited to 'Eigen/src/Core/Matrix.h')
-rw-r--r--Eigen/src/Core/Matrix.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h
index cde5dcebf..8984f3893 100644
--- a/Eigen/src/Core/Matrix.h
+++ b/Eigen/src/Core/Matrix.h
@@ -79,6 +79,8 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols, _Storage
{
public:
friend class MatrixBase<_Scalar, Matrix>;
+ friend class Map<Matrix>;
+
typedef MatrixBase<_Scalar, Matrix> Base;
typedef MatrixStorage<_Scalar, _Rows, _Cols> Storage;
typedef _Scalar Scalar;
@@ -91,16 +93,15 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols, _Storage
Scalar* data()
{ return Storage::m_data; }
- static const MatrixStorageOrder Order = _StorageOrder;
- static const int RowsAtCompileTime = _Rows, ColsAtCompileTime = _Cols;
-
private:
+ static const int RowsAtCompileTime = _Rows, ColsAtCompileTime = _Cols;
+ static const MatrixStorageOrder StorageOrder = _StorageOrder;
Ref _ref() const { return Ref(*this); }
const Scalar& _coeff(int row, int col) const
{
- if(Order == ColumnMajor)
+ if(_StorageOrder == ColumnMajor)
return (Storage::m_data)[row + col * Storage::_rows()];
else // RowMajor
return (Storage::m_data)[col + row * Storage::_cols()];
@@ -108,7 +109,7 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols, _Storage
Scalar& _coeffRef(int row, int col)
{
- if(Order == ColumnMajor)
+ if(_StorageOrder == ColumnMajor)
return (Storage::m_data)[row + col * Storage::_rows()];
else // RowMajor
return (Storage::m_data)[col + row * Storage::_cols()];