diff options
author | 2010-05-30 16:00:58 -0400 | |
---|---|---|
committer | 2010-05-30 16:00:58 -0400 | |
commit | aaaade4b3d66d67d2c08af3372c3965e7255b2e8 (patch) | |
tree | 76dfaefb014333b2f98c6db660454771655ea8b7 /Eigen/src/Geometry/Homogeneous.h | |
parent | faa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff) |
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Geometry/Homogeneous.h')
-rw-r--r-- | Eigen/src/Geometry/Homogeneous.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index caea1db41..3077f0921 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -77,10 +77,10 @@ template<typename MatrixType,int _Direction> class Homogeneous : m_matrix(matrix) {} - inline int rows() const { return m_matrix.rows() + (int(Direction)==Vertical ? 1 : 0); } - inline int cols() const { return m_matrix.cols() + (int(Direction)==Horizontal ? 1 : 0); } + inline Index rows() const { return m_matrix.rows() + (int(Direction)==Vertical ? 1 : 0); } + inline Index cols() const { return m_matrix.cols() + (int(Direction)==Horizontal ? 1 : 0); } - inline Scalar coeff(int row, int col) const + inline Scalar coeff(Index row, Index col) const { if( (int(Direction)==Vertical && row==m_matrix.rows()) || (int(Direction)==Horizontal && col==m_matrix.cols())) @@ -223,12 +223,13 @@ struct ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> : public ReturnByValue<ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> > { typedef typename ei_cleantype<typename Lhs::Nested>::type LhsNested; + typedef typename MatrixType::Index Index; ei_homogeneous_left_product_impl(const Lhs& lhs, const MatrixType& rhs) : m_lhs(lhs), m_rhs(rhs) {} - inline int rows() const { return m_lhs.rows(); } - inline int cols() const { return m_rhs.cols(); } + inline Index rows() const { return m_lhs.rows(); } + inline Index cols() const { return m_rhs.cols(); } template<typename Dest> void evalTo(Dest& dst) const { @@ -261,12 +262,13 @@ struct ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> : public ReturnByValue<ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> > { typedef typename ei_cleantype<typename Rhs::Nested>::type RhsNested; + typedef typename MatrixType::Index Index; ei_homogeneous_right_product_impl(const MatrixType& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {} - inline int rows() const { return m_lhs.rows(); } - inline int cols() const { return m_rhs.cols(); } + inline Index rows() const { return m_lhs.rows(); } + inline Index cols() const { return m_rhs.cols(); } template<typename Dest> void evalTo(Dest& dst) const { |