diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-04-01 14:07:38 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-04-01 14:07:38 +0000 |
commit | 0f8e692b3f5edcab61d586d0a996a2e30bbb68a2 (patch) | |
tree | 123daf9331ebec2e605545aa296a7ca1d7cec753 /Eigen/src | |
parent | 113fc3a2606997533287921ccec49e320bf9f79b (diff) |
* Find SuperLU also when it is installed without a superlu/ prefix
* Some more CoeffReturnType changes
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Core/Block.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/NestByValue.h | 4 | ||||
-rw-r--r-- | Eigen/src/Core/Transpose.h | 12 | ||||
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 1 |
4 files changed, 11 insertions, 10 deletions
diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 1d5e5145e..6d28ebc73 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -152,7 +152,7 @@ template<typename MatrixType, int BlockRows, int BlockCols, int PacketAccess, in .coeffRef(row + m_startRow.value(), col + m_startCol.value()); } - inline const Scalar coeff(int row, int col) const + inline const CoeffReturnType coeff(int row, int col) const { return m_matrix.coeff(row + m_startRow.value(), col + m_startCol.value()); } @@ -164,7 +164,7 @@ template<typename MatrixType, int BlockRows, int BlockCols, int PacketAccess, in m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0)); } - inline const Scalar coeff(int index) const + inline const CoeffReturnType coeff(int index) const { return m_matrix .coeff(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), diff --git a/Eigen/src/Core/NestByValue.h b/Eigen/src/Core/NestByValue.h index dfe757447..844dfb115 100644 --- a/Eigen/src/Core/NestByValue.h +++ b/Eigen/src/Core/NestByValue.h @@ -54,7 +54,7 @@ template<typename ExpressionType> class NestByValue inline int cols() const { return m_expression.cols(); } inline int stride() const { return m_expression.stride(); } - inline const Scalar coeff(int row, int col) const + inline const CoeffReturnType coeff(int row, int col) const { return m_expression.coeff(row, col); } @@ -64,7 +64,7 @@ template<typename ExpressionType> class NestByValue return m_expression.const_cast_derived().coeffRef(row, col); } - inline const Scalar coeff(int index) const + inline const CoeffReturnType coeff(int index) const { return m_expression.coeff(index); } diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index 6e3a13f40..edb87d0c3 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -77,19 +77,19 @@ template<typename MatrixType> class Transpose return m_matrix.const_cast_derived().coeffRef(col, row); } - inline const Scalar coeff(int row, int col) const + inline Scalar& coeffRef(int index) { - return m_matrix.coeff(col, row); + return m_matrix.const_cast_derived().coeffRef(index); } - inline const Scalar coeff(int index) const + inline const CoeffReturnType coeff(int row, int col) const { - return m_matrix.coeff(index); + return m_matrix.coeff(col, row); } - inline Scalar& coeffRef(int index) + inline const CoeffReturnType coeff(int index) const { - return m_matrix.const_cast_derived().coeffRef(index); + return m_matrix.coeff(index); } template<int LoadMode> diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index 2ffb92d5e..55d0f2649 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -245,6 +245,7 @@ typedef BaseClass Base; \ typedef typename Eigen::ei_traits<Derived>::Scalar Scalar; \ typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \ typedef typename Base::PacketScalar PacketScalar; \ +typedef typename Base::CoeffReturnType CoeffReturnType; \ typedef typename Eigen::ei_nested<Derived>::type Nested; \ enum { RowsAtCompileTime = Eigen::ei_traits<Derived>::RowsAtCompileTime, \ ColsAtCompileTime = Eigen::ei_traits<Derived>::ColsAtCompileTime, \ |