diff options
author | 2007-10-13 20:53:30 +0000 | |
---|---|---|
committer | 2007-10-13 20:53:30 +0000 | |
commit | 5f0af72abc1a364a2f974db10b9e7e163679fae8 (patch) | |
tree | 21c21545219fc120e049d6855cb74070de915887 /src | |
parent | e445f5085a65ca14cba2f57efb285173429ff576 (diff) |
mark more methods as const. also rename, Numeric.h->NumTraits.h
Diffstat (limited to 'src')
-rw-r--r-- | src/Core.h | 2 | ||||
-rw-r--r-- | src/Core/Block.h | 5 | ||||
-rw-r--r-- | src/Core/Minor.h | 4 | ||||
-rw-r--r-- | src/Core/NumTraits.h (renamed from src/Core/Numeric.h) | 0 | ||||
-rw-r--r-- | src/Core/Object.h | 6 | ||||
-rw-r--r-- | src/Core/Transpose.h | 4 |
6 files changed, 11 insertions, 10 deletions
diff --git a/src/Core.h b/src/Core.h index d0e0c05ec..3ab2cf965 100644 --- a/src/Core.h +++ b/src/Core.h @@ -6,7 +6,7 @@ namespace Eigen { #include "Core/Util.h" -#include "Core/Numeric.h" +#include "Core/NumTraits.h" #include "Core/Object.h" #include "Core/CopyHelper.h" #include "Core/MatrixRef.h" diff --git a/src/Core/Block.h b/src/Core/Block.h index a6dc51df1..d705133b5 100644 --- a/src/Core/Block.h +++ b/src/Core/Block.h @@ -76,9 +76,10 @@ template<typename MatrixType> class Block template<typename Scalar, typename Derived> Block<Derived> -Object<Scalar, Derived>::block(int startRow, int endRow, int startCol, int endCol) +Object<Scalar, Derived>::block(int startRow, int endRow, int startCol, int endCol) const { - return Block<Derived>(static_cast<Derived*>(this)->ref(), startRow, endRow, startCol, endCol); + return Block<Derived>(static_cast<Derived*>(const_cast<Object*>(this))->ref(), + startRow, endRow, startCol, endCol); } #endif // EI_BLOCK_H diff --git a/src/Core/Minor.h b/src/Core/Minor.h index 30bba17cc..95d52f293 100644 --- a/src/Core/Minor.h +++ b/src/Core/Minor.h @@ -75,9 +75,9 @@ template<typename MatrixType> class Minor template<typename Scalar, typename Derived> Minor<Derived> -Object<Scalar, Derived>::minor(int row, int col) +Object<Scalar, Derived>::minor(int row, int col) const { - return Minor<Derived>(static_cast<Derived*>(this)->ref(), row, col); + return Minor<Derived>(static_cast<Derived*>(const_cast<Object*>(this))->ref(), row, col); } #endif // EI_MINOR_H diff --git a/src/Core/Numeric.h b/src/Core/NumTraits.h index 3ef3615cd..3ef3615cd 100644 --- a/src/Core/Numeric.h +++ b/src/Core/NumTraits.h diff --git a/src/Core/Object.h b/src/Core/Object.h index e53b5be49..72928406b 100644 --- a/src/Core/Object.h +++ b/src/Core/Object.h @@ -97,9 +97,9 @@ template<typename Scalar, typename Derived> class Object Row<Derived> row(int i) const; Column<Derived> col(int i) const; - Minor<Derived> minor(int row, int col); - Block<Derived> block(int startRow, int endRow, int startCol, int endCol); - Transpose<Derived> transpose(); + Minor<Derived> minor(int row, int col) const; + Block<Derived> block(int startRow, int endRow, int startCol, int endCol) const; + Transpose<Derived> transpose() const; Conjugate<Derived> conjugate() const; Transpose<Conjugate<Derived> > adjoint() const { return conjugate().transpose(); } Scalar trace() const; diff --git a/src/Core/Transpose.h b/src/Core/Transpose.h index 2bc8c7575..b15ad4691 100644 --- a/src/Core/Transpose.h +++ b/src/Core/Transpose.h @@ -66,9 +66,9 @@ template<typename MatrixType> class Transpose template<typename Scalar, typename Derived> Transpose<Derived> -Object<Scalar, Derived>::transpose() +Object<Scalar, Derived>::transpose() const { - return Transpose<Derived>(static_cast<Derived*>(this)->ref()); + return Transpose<Derived>(static_cast<Derived*>(const_cast<Object*>(this))->ref()); } #endif // EI_TRANSPOSE_H |