aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/Block.h3
-rw-r--r--src/internal/Matrix.h1
-rw-r--r--src/internal/MatrixAlias.h84
-rw-r--r--src/internal/MatrixOps.h6
-rw-r--r--src/internal/Minor.h3
-rw-r--r--src/internal/RowAndCol.h6
-rw-r--r--src/internal/ScalarOps.h3
7 files changed, 21 insertions, 85 deletions
diff --git a/src/internal/Block.h b/src/internal/Block.h
index dde15b0c0..cd4422887 100644
--- a/src/internal/Block.h
+++ b/src/internal/Block.h
@@ -36,6 +36,9 @@ template<typename MatrixType> class MatrixBlock
typedef typename MatrixType::Ref MatRef;
friend class EigenBase<Scalar, MatrixBlock<MatrixType> >;
typedef MatrixBlock Ref;
+
+ static const int RowsAtCompileTime = DynamicSize,
+ ColsAtCompileTime = DynamicSize;
MatrixBlock(const MatRef& matrix,
int startRow, int endRow,
diff --git a/src/internal/Matrix.h b/src/internal/Matrix.h
index a6efcd866..a4018c29d 100644
--- a/src/internal/Matrix.h
+++ b/src/internal/Matrix.h
@@ -125,7 +125,6 @@ EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)
} // namespace Eigen
-#include "MatrixAlias.h"
#include "MatrixOps.h"
#include "ScalarOps.h"
#include "RowAndCol.h"
diff --git a/src/internal/MatrixAlias.h b/src/internal/MatrixAlias.h
deleted file mode 100644
index 94d913a5f..000000000
--- a/src/internal/MatrixAlias.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// This file is part of Eigen, a lightweight C++ template library
-// for linear algebra. Eigen itself is part of the KDE project.
-//
-// Copyright (C) 2006-2007 Benoit Jacob <jacob@math.jussieu.fr>
-//
-// Eigen is free software; you can redistribute it and/or modify it under the
-// terms of the GNU General Public License as published by the Free Software
-// Foundation; either version 2 or (at your option) any later version.
-//
-// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
-// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General Public License along
-// with Eigen; if not, write to the Free Software Foundation, Inc., 51
-// Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// As a special exception, if other files instantiate templates or use macros
-// or functions from this file, or you compile this file and link it
-// with other works to produce a work based on this file, this file does not
-// by itself cause the resulting work to be covered by the GNU General Public
-// License. This exception does not invalidate any other reasons why a work
-// based on this file might be covered by the GNU General Public License.
-
-#ifndef EIGEN_MATRIXALIAS_H
-#define EIGEN_MATRIXALIAS_H
-
-namespace Eigen
-{
-
-template<typename MatrixType> class MatrixAlias
- : public EigenBase<typename MatrixType::Scalar, MatrixAlias<MatrixType> >
-{
- public:
- typedef typename MatrixType::Scalar Scalar;
- typedef MatrixRef<MatrixAlias> Ref;
- typedef EigenBase<typename MatrixType::Scalar, MatrixAlias> Base;
- friend class EigenBase<typename MatrixType::Scalar, MatrixAlias>;
-
- MatrixAlias(MatrixType& matrix) : m_aliased(matrix), m_tmp(matrix) {}
- MatrixAlias(const MatrixAlias& other) : m_aliased(other.m_aliased), m_tmp(other.m_tmp) {}
-
- ~MatrixAlias()
- {
- m_aliased = m_tmp;
- }
-
- INHERIT_ASSIGNMENT_OPERATORS(MatrixAlias)
-
- private:
- Ref _ref() const
- {
- return Ref(*const_cast<MatrixAlias*>(this));
- }
-
- int _rows() const { return m_tmp.rows(); }
- int _cols() const { return m_tmp.cols(); }
-
- Scalar& _write(int row, int col)
- {
- return m_tmp.write(row, col);
- }
-
- Scalar _read(int row, int col) const
- {
- return m_aliased.read(row, col);
- }
-
- protected:
- MatrixRef<MatrixType> m_aliased;
- MatrixType m_tmp;
-};
-
-template<typename _Scalar, int _Rows, int _Cols>
-typename Matrix<_Scalar, _Rows, _Cols>::Alias
-Matrix<_Scalar, _Rows, _Cols>::alias()
-{
- return Alias(*this);
-}
-
-} // namespace Eigen
-
-#endif // EIGEN_MATRIXALIAS_H
diff --git a/src/internal/MatrixOps.h b/src/internal/MatrixOps.h
index 34a24e914..5697588ac 100644
--- a/src/internal/MatrixOps.h
+++ b/src/internal/MatrixOps.h
@@ -37,6 +37,9 @@ template<typename Lhs, typename Rhs> class MatrixSum
typedef typename Rhs::Ref RhsRef;
friend class EigenBase<Scalar, MatrixSum>;
typedef MatrixSum Ref;
+
+ static const int RowsAtCompileTime = Lhs::RowsAtCompileTime,
+ ColsAtCompileTime = Rhs::ColsAtCompileTime;
MatrixSum(const LhsRef& lhs, const RhsRef& rhs)
: m_lhs(lhs), m_rhs(rhs)
@@ -75,6 +78,9 @@ template<typename Lhs, typename Rhs> class MatrixDifference
friend class EigenBase<Scalar, MatrixDifference>;
typedef MatrixDifference Ref;
+ static const int RowsAtCompileTime = Lhs::RowsAtCompileTime,
+ ColsAtCompileTime = Rhs::ColsAtCompileTime;
+
MatrixDifference(const LhsRef& lhs, const RhsRef& rhs)
: m_lhs(lhs), m_rhs(rhs)
{
diff --git a/src/internal/Minor.h b/src/internal/Minor.h
index 05873f1f1..c7ddd5de3 100644
--- a/src/internal/Minor.h
+++ b/src/internal/Minor.h
@@ -36,6 +36,9 @@ template<typename MatrixType> class MatrixMinor
typedef typename MatrixType::Ref MatRef;
friend class EigenBase<Scalar, MatrixMinor<MatrixType> >;
typedef MatrixMinor Ref;
+
+ static const int RowsAtCompileTime = MatrixType::RowsAtCompileTime - 1,
+ ColsAtCompileTime = MatrixType::ColsAtCompileTime - 1;
MatrixMinor(const MatRef& matrix,
int row, int col = 0)
diff --git a/src/internal/RowAndCol.h b/src/internal/RowAndCol.h
index d7e3f73b0..c8e9eb46d 100644
--- a/src/internal/RowAndCol.h
+++ b/src/internal/RowAndCol.h
@@ -37,6 +37,9 @@ template<typename MatrixType> class MatrixRow
friend class EigenBase<Scalar, MatrixRow<MatrixType> >;
typedef MatrixRow Ref;
+ static const int RowsAtCompileTime = MatrixType::ColsAtCompileTime,
+ ColsAtCompileTime = 1;
+
MatrixRow(const MatRef& matrix, int row)
: m_matrix(matrix), m_row(row)
{
@@ -88,6 +91,9 @@ template<typename MatrixType> class MatrixCol
friend class EigenBase<Scalar, MatrixCol<MatrixType> >;
typedef MatrixCol Ref;
+ static const int RowsAtCompileTime = MatrixType::RowsAtCompileTime,
+ ColsAtCompileTime = 1;
+
MatrixCol(const MatRef& matrix, int col)
: m_matrix(matrix), m_col(col)
{
diff --git a/src/internal/ScalarOps.h b/src/internal/ScalarOps.h
index de2cad770..ecfebcaf3 100644
--- a/src/internal/ScalarOps.h
+++ b/src/internal/ScalarOps.h
@@ -37,6 +37,9 @@ template<typename MatrixType> class ScalarProduct
typedef ScalarProduct Ref;
friend class EigenBase<typename MatrixType::Scalar, ScalarProduct<MatrixType> >;
+ static const int RowsAtCompileTime = MatrixType::RowsAtCompileTime,
+ ColsAtCompileTime = MatrixType::ColsAtCompileTime;
+
ScalarProduct(const MatRef& matrix, Scalar scalar)
: m_matrix(matrix), m_scalar(scalar) {}