diff --git a/Eigen/src/Array/PartialRedux.h b/Eigen/src/Array/PartialRedux.h index aa85b6ac0..023372f8a 100644 --- a/Eigen/src/Array/PartialRedux.h +++ b/Eigen/src/Array/PartialRedux.h @@ -79,10 +79,10 @@ class PartialRedux : ei_no_assignment_operator, private: - int _rows() const { return (Direction==Vertical ? 1 : m_matrix.rows()); } - int _cols() const { return (Direction==Horizontal ? 1 : m_matrix.cols()); } + int rows() const { return (Direction==Vertical ? 1 : m_matrix.rows()); } + int cols() const { return (Direction==Horizontal ? 1 : m_matrix.cols()); } - const Scalar _coeff(int i, int j) const + const Scalar coeff(int i, int j) const { if (Direction==Vertical) return m_matrix.col(j).redux(m_functor); diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index e9f5bab29..33aeb78a3 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -134,25 +134,23 @@ template class Block EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block) - private: + inline int rows() const { return m_blockRows.value(); } + inline int cols() const { return m_blockCols.value(); } - inline int _rows() const { return m_blockRows.value(); } - inline int _cols() const { return m_blockCols.value(); } + inline int stride(void) const { return m_matrix.stride(); } - inline int _stride(void) const { return m_matrix.stride(); } - - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { return m_matrix.const_cast_derived() .coeffRef(row + m_startRow.value(), col + m_startCol.value()); } - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return m_matrix.coeff(row + m_startRow.value(), col + m_startCol.value()); } - inline Scalar& _coeffRef(int index) + inline Scalar& coeffRef(int index) { return m_matrix.const_cast_derived() .coeffRef(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), @@ -160,7 +158,7 @@ template class Block } - inline const Scalar _coeff(int index) const + inline const Scalar coeff(int index) const { return m_matrix .coeff(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), @@ -168,26 +166,26 @@ template class Block } template - inline PacketScalar _packet(int row, int col) const + inline PacketScalar packet(int row, int col) const { return m_matrix.template packet(row + m_startRow.value(), col + m_startCol.value()); } template - inline void _writePacket(int row, int col, const PacketScalar& x) + inline void writePacket(int row, int col, const PacketScalar& x) { m_matrix.const_cast_derived().template writePacket(row + m_startRow.value(), col + m_startCol.value(), x); } template - inline PacketScalar _packet(int index) const + inline PacketScalar packet(int index) const { return m_matrix.template packet(m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), m_startCol.value() + (RowsAtCompileTime == 1 ? index : 0)); } template - inline void _writePacket(int index, const PacketScalar& x) + inline void writePacket(int index, const PacketScalar& x) { m_matrix.const_cast_derived().template writePacket (m_startRow.value() + (RowsAtCompileTime == 1 ? 0 : index), diff --git a/Eigen/src/Core/Coeffs.h b/Eigen/src/Core/Coeffs.h index 53b551b19..cc8bc713c 100644 --- a/Eigen/src/Core/Coeffs.h +++ b/Eigen/src/Core/Coeffs.h @@ -45,7 +45,7 @@ inline const typename ei_traits::Scalar MatrixBase { ei_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); - return derived()._coeff(row, col); + return derived().coeff(row, col); } /** \returns the coefficient at given the given row and column. @@ -58,7 +58,7 @@ inline const typename ei_traits::Scalar MatrixBase { ei_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); - return derived()._coeff(row, col); + return derived().coeff(row, col); } /** Short version: don't use this function, use @@ -81,7 +81,7 @@ inline typename ei_traits::Scalar& MatrixBase { ei_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); - return derived()._coeffRef(row, col); + return derived().coeffRef(row, col); } /** \returns a reference to the coefficient at given the given row and column. @@ -94,7 +94,7 @@ inline typename ei_traits::Scalar& MatrixBase { ei_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); - return derived()._coeffRef(row, col); + return derived().coeffRef(row, col); } /** Short version: don't use this function, use @@ -116,7 +116,7 @@ inline const typename ei_traits::Scalar MatrixBase ::coeff(int index) const { ei_internal_assert(index >= 0 && index < size()); - return derived()._coeff(index); + return derived().coeff(index); } /** \returns the coefficient at given index. @@ -131,7 +131,7 @@ inline const typename ei_traits::Scalar MatrixBase ::operator[](int index) const { ei_assert(index >= 0 && index < size()); - return derived()._coeff(index); + return derived().coeff(index); } /** Short version: don't use this function, use @@ -153,7 +153,7 @@ inline typename ei_traits::Scalar& MatrixBase ::coeffRef(int index) { ei_internal_assert(index >= 0 && index < size()); - return derived()._coeffRef(index); + return derived().coeffRef(index); } /** \returns a reference to the coefficient at given index. @@ -167,7 +167,7 @@ inline typename ei_traits::Scalar& MatrixBase ::operator[](int index) { ei_assert(index >= 0 && index < size()); - return derived()._coeffRef(index); + return derived().coeffRef(index); } /** equivalent to operator[](0). */ @@ -225,7 +225,7 @@ MatrixBase::packet(int row, int col) const { ei_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); - return derived().template _packet(row,col); + return derived().template packet(row,col); } /** Stores the given packet of coefficients, at the given row and column of this expression. It is your responsibility @@ -243,7 +243,7 @@ inline void MatrixBase::writePacket { ei_internal_assert(row >= 0 && row < rows() && col >= 0 && col < cols()); - derived().template _writePacket(row,col,x); + derived().template writePacket(row,col,x); } /** \returns the packet of coefficients starting at the given index. It is your responsibility @@ -260,7 +260,7 @@ inline typename ei_packet_traits::Scalar>::type MatrixBase::packet(int index) const { ei_internal_assert(index >= 0 && index < size()); - return derived().template _packet(index); + return derived().template packet(index); } /** Stores the given packet of coefficients, at the given index in this expression. It is your responsibility @@ -277,7 +277,7 @@ inline void MatrixBase::writePacket (int index, const typename ei_packet_traits::Scalar>::type& x) { ei_internal_assert(index >= 0 && index < size()); - derived().template _writePacket(index,x); + derived().template writePacket(index,x); } diff --git a/Eigen/src/Core/CwiseBinaryOp.h b/Eigen/src/Core/CwiseBinaryOp.h index 6672edcbe..2441b30f6 100644 --- a/Eigen/src/Core/CwiseBinaryOp.h +++ b/Eigen/src/Core/CwiseBinaryOp.h @@ -92,29 +92,27 @@ class CwiseBinaryOp : ei_no_assignment_operator, ei_assert(lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols()); } - private: + inline int rows() const { return m_lhs.rows(); } + inline int cols() const { return m_lhs.cols(); } - inline int _rows() const { return m_lhs.rows(); } - inline int _cols() const { return m_lhs.cols(); } - - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return m_functor(m_lhs.coeff(row, col), m_rhs.coeff(row, col)); } template - inline PacketScalar _packet(int row, int col) const + inline PacketScalar packet(int row, int col) const { return m_functor.packetOp(m_lhs.template packet(row, col), m_rhs.template packet(row, col)); } - inline const Scalar _coeff(int index) const + inline const Scalar coeff(int index) const { return m_functor(m_lhs.coeff(index), m_rhs.coeff(index)); } template - inline PacketScalar _packet(int index) const + inline PacketScalar packet(int index) const { return m_functor.packetOp(m_lhs.template packet(index), m_rhs.template packet(index)); } diff --git a/Eigen/src/Core/CwiseNullaryOp.h b/Eigen/src/Core/CwiseNullaryOp.h index 998b7ce56..78ecb878b 100644 --- a/Eigen/src/Core/CwiseNullaryOp.h +++ b/Eigen/src/Core/CwiseNullaryOp.h @@ -75,29 +75,27 @@ class CwiseNullaryOp : ei_no_assignment_operator, && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols)); } - private: + int rows() const { return m_rows.value(); } + int cols() const { return m_cols.value(); } - int _rows() const { return m_rows.value(); } - int _cols() const { return m_cols.value(); } - - const Scalar _coeff(int rows, int cols) const + const Scalar coeff(int rows, int cols) const { return m_functor(rows, cols); } template - PacketScalar _packet(int, int) const + PacketScalar packet(int, int) const { return m_functor.packetOp(); } - const Scalar _coeff(int index) const + const Scalar coeff(int index) const { return m_functor(index); } template - PacketScalar _packet(int) const + PacketScalar packet(int) const { return m_functor.packetOp(); } diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 881853d28..c80124b47 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -74,29 +74,27 @@ class CwiseUnaryOp : ei_no_assignment_operator, inline CwiseUnaryOp(const MatrixType& mat, const UnaryOp& func = UnaryOp()) : m_matrix(mat), m_functor(func) {} - private: + inline int rows() const { return m_matrix.rows(); } + inline int cols() const { return m_matrix.cols(); } - inline int _rows() const { return m_matrix.rows(); } - inline int _cols() const { return m_matrix.cols(); } - - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return m_functor(m_matrix.coeff(row, col)); } template - inline PacketScalar _packet(int row, int col) const + inline PacketScalar packet(int row, int col) const { return m_functor.packetOp(m_matrix.template packet(row, col)); } - inline const Scalar _coeff(int index) const + inline const Scalar coeff(int index) const { return m_functor(m_matrix.coeff(index)); } template - inline PacketScalar _packet(int index) const + inline PacketScalar packet(int index) const { return m_functor.packetOp(m_matrix.template packet(index)); } diff --git a/Eigen/src/Core/DiagonalCoeffs.h b/Eigen/src/Core/DiagonalCoeffs.h index 516d52526..2560d73bc 100644 --- a/Eigen/src/Core/DiagonalCoeffs.h +++ b/Eigen/src/Core/DiagonalCoeffs.h @@ -73,27 +73,25 @@ template class DiagonalCoeffs EIGEN_INHERIT_ASSIGNMENT_OPERATORS(DiagonalCoeffs) - private: + inline int rows() const { return std::min(m_matrix.rows(), m_matrix.cols()); } + inline int cols() const { return 1; } - inline int _rows() const { return std::min(m_matrix.rows(), m_matrix.cols()); } - inline int _cols() const { return 1; } - - inline Scalar& _coeffRef(int row, int) + inline Scalar& coeffRef(int row, int) { return m_matrix.const_cast_derived().coeffRef(row, row); } - inline const Scalar _coeff(int row, int) const + inline const Scalar coeff(int row, int) const { return m_matrix.coeff(row, row); } - inline Scalar& _coeffRef(int index) + inline Scalar& coeffRef(int index) { return m_matrix.const_cast_derived().coeffRef(index, index); } - inline const Scalar _coeff(int index) const + inline const Scalar coeff(int index) const { return m_matrix.coeff(index, index); } diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 2a5b618e8..34bd7ebf3 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -68,12 +68,10 @@ class DiagonalMatrix : ei_no_assignment_operator, && coeffs.size() > 0); } - private: + inline int rows() const { return m_coeffs.size(); } + inline int cols() const { return m_coeffs.size(); } - inline int _rows() const { return m_coeffs.size(); } - inline int _cols() const { return m_coeffs.size(); } - - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return row == col ? m_coeffs.coeff(row) : static_cast(0); } diff --git a/Eigen/src/Core/DiagonalProduct.h b/Eigen/src/Core/DiagonalProduct.h index 38d6ad46b..1a2338487 100644 --- a/Eigen/src/Core/DiagonalProduct.h +++ b/Eigen/src/Core/DiagonalProduct.h @@ -82,19 +82,17 @@ template class Product - const PacketScalar _packet(int row, int col) const + const PacketScalar packet(int row, int col) const { if (RhsIsDiagonal) { diff --git a/Eigen/src/Core/Extract.h b/Eigen/src/Core/Extract.h index 473ff7d6b..516178c2c 100755 --- a/Eigen/src/Core/Extract.h +++ b/Eigen/src/Core/Extract.h @@ -69,12 +69,10 @@ template class Extract EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Extract) - private: + inline int rows() const { return m_matrix.rows(); } + inline int cols() const { return m_matrix.cols(); } - inline int _rows() const { return m_matrix.rows(); } - inline int _cols() const { return m_matrix.cols(); } - - inline Scalar _coeff(int row, int col) const + inline Scalar coeff(int row, int col) const { if(Flags & LowerTriangularBit ? col>row : row>col) return (Flags & SelfAdjointBit) ? ei_conj(m_matrix.coeff(col, row)) : (Scalar)0; diff --git a/Eigen/src/Core/Flagged.h b/Eigen/src/Core/Flagged.h index 8afd068c4..c4b464ce2 100644 --- a/Eigen/src/Core/Flagged.h +++ b/Eigen/src/Core/Flagged.h @@ -68,52 +68,50 @@ template clas /** \internal */ inline const ExpressionType& _expression() const { return m_matrix; } - private: + inline int rows() const { return m_matrix.rows(); } + inline int cols() const { return m_matrix.cols(); } + inline int stride() const { return m_matrix.stride(); } - inline int _rows() const { return m_matrix.rows(); } - inline int _cols() const { return m_matrix.cols(); } - inline int _stride() const { return m_matrix.stride(); } - - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return m_matrix.coeff(row, col); } - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { return m_matrix.const_cast_derived().coeffRef(row, col); } - inline const Scalar _coeff(int index) const + inline const Scalar coeff(int index) const { return m_matrix.coeff(index); } - inline Scalar& _coeffRef(int index) + inline Scalar& coeffRef(int index) { return m_matrix.const_cast_derived().coeffRef(index); } template - inline const PacketScalar _packet(int row, int col) const + inline const PacketScalar packet(int row, int col) const { return m_matrix.template packet(row, col); } template - inline void _writePacket(int row, int col, const PacketScalar& x) + inline void writePacket(int row, int col, const PacketScalar& x) { m_matrix.const_cast_derived().template writePacket(row, col, x); } template - inline const PacketScalar _packet(int index) const + inline const PacketScalar packet(int index) const { return m_matrix.template packet(index); } template - inline void _writePacket(int index, const PacketScalar& x) + inline void writePacket(int index, const PacketScalar& x) { m_matrix.const_cast_derived().template writePacket(index, x); } diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index bcd72bdb8..335c2a85f 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -59,12 +59,10 @@ template class Map EIGEN_GENERIC_PUBLIC_INTERFACE(Map) - private: + inline int rows() const { return m_rows; } + inline int cols() const { return m_cols; } - inline int _rows() const { return m_rows; } - inline int _cols() const { return m_cols; } - - inline const Scalar& _coeff(int row, int col) const + inline const Scalar& coeff(int row, int col) const { if(Flags & RowMajorBit) return m_data[col + row * m_cols]; @@ -72,7 +70,7 @@ template class Map return m_data[row + col * m_rows]; } - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { if(Flags & RowMajorBit) return const_cast(m_data)[col + row * m_cols]; @@ -80,12 +78,12 @@ template class Map return const_cast(m_data)[row + col * m_rows]; } - inline const Scalar& _coeff(int index) const + inline const Scalar& coeff(int index) const { return m_data[index]; } - inline Scalar& _coeffRef(int index) + inline Scalar& coeffRef(int index) { return m_data[index]; } diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 3d037cbee..40947e997 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -100,19 +100,18 @@ template > { public: - EIGEN_GENERIC_PUBLIC_INTERFACE(Matrix) - friend class Map; - - private: - + protected: ei_matrix_storage m_storage; - inline int _rows() const { return m_storage.rows(); } - inline int _cols() const { return m_storage.cols(); } + public: + friend class Map; - inline int _stride(void) const + inline int rows() const { return m_storage.rows(); } + inline int cols() const { return m_storage.cols(); } + + inline int stride(void) const { if(Flags & RowMajorBit) return m_storage.cols(); @@ -120,7 +119,7 @@ class Matrix : public MatrixBase - inline PacketScalar _packet(int row, int col) const + inline PacketScalar packet(int row, int col) const { if(Flags & RowMajorBit) if (LoadMode==Aligned) @@ -162,7 +161,7 @@ class Matrix : public MatrixBase - inline PacketScalar _packet(int index) const + inline PacketScalar packet(int index) const { if (LoadMode==Aligned) return ei_pload(m_storage.data() + index); @@ -171,7 +170,7 @@ class Matrix : public MatrixBase - inline void _writePacket(int row, int col, const PacketScalar& x) + inline void writePacket(int row, int col, const PacketScalar& x) { ei_internal_assert(Flags & PacketAccessBit); if(Flags & RowMajorBit) @@ -187,7 +186,7 @@ class Matrix : public MatrixBase - inline void _writePacket(int index, const PacketScalar& x) + inline void writePacket(int index, const PacketScalar& x) { if (StoreMode==Aligned) ei_pstore(m_storage.data() + index, x); diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index f503ebcbf..06ee74214 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -148,9 +148,9 @@ template class MatrixBase typedef typename NumTraits::Real RealScalar; /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ - inline int rows() const { return derived()._rows(); } + inline int rows() const { return derived().rows(); } /** \returns the number of columns. \sa row(), ColsAtCompileTime*/ - inline int cols() const { return derived()._cols(); } + inline int cols() const { return derived().cols(); } /** \returns the number of coefficients, which is \a rows()*cols(). * \sa rows(), cols(), SizeAtCompileTime. */ inline int size() const { return rows() * cols(); } @@ -433,7 +433,7 @@ template class MatrixBase * Combined with coeffRef() and the \ref flags flags, it allows a direct access to the data * of the underlying matrix. */ - inline int stride(void) const { return derived()._stride(); } + inline int stride(void) const { return derived().stride(); } inline const NestByValue nestByValue() const; diff --git a/Eigen/src/Core/Minor.h b/Eigen/src/Core/Minor.h index d22f41982..9e87c9b9b 100644 --- a/Eigen/src/Core/Minor.h +++ b/Eigen/src/Core/Minor.h @@ -74,17 +74,15 @@ template class Minor EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Minor) - private: + inline int rows() const { return m_matrix.rows() - 1; } + inline int cols() const { return m_matrix.cols() - 1; } - inline int _rows() const { return m_matrix.rows() - 1; } - inline int _cols() const { return m_matrix.cols() - 1; } - - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { return m_matrix.const_cast_derived().coeffRef(row + (row >= m_row), col + (col >= m_col)); } - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return m_matrix.coeff(row + (row >= m_row), col + (col >= m_col)); } diff --git a/Eigen/src/Core/NestByValue.h b/Eigen/src/Core/NestByValue.h index a63202dfd..86d8795cd 100644 --- a/Eigen/src/Core/NestByValue.h +++ b/Eigen/src/Core/NestByValue.h @@ -60,52 +60,50 @@ template class NestByValue inline NestByValue(const ExpressionType& matrix) : m_expression(matrix) {} - private: + inline int rows() const { return m_expression.rows(); } + inline int cols() const { return m_expression.cols(); } + inline int stride() const { return m_expression.stride(); } - inline int _rows() const { return m_expression.rows(); } - 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 Scalar coeff(int row, int col) const { return m_expression.coeff(row, col); } - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { return m_expression.const_cast_derived().coeffRef(row, col); } - inline const Scalar _coeff(int index) const + inline const Scalar coeff(int index) const { return m_expression.coeff(index); } - inline Scalar& _coeffRef(int index) + inline Scalar& coeffRef(int index) { return m_expression.const_cast_derived().coeffRef(index); } template - inline const PacketScalar _packet(int row, int col) const + inline const PacketScalar packet(int row, int col) const { return m_expression.template packet(row, col); } template - inline void _writePacket(int row, int col, const PacketScalar& x) + inline void writePacket(int row, int col, const PacketScalar& x) { m_expression.const_cast_derived().template writePacket(row, col, x); } template - inline const PacketScalar _packet(int index) const + inline const PacketScalar packet(int index) const { return m_expression.template packet(index); } template - inline void _writePacket(int index, const PacketScalar& x) + inline void writePacket(int index, const PacketScalar& x) { m_expression.const_cast_derived().template writePacket(index, x); } diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index df35ffc4f..a0b29449c 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -206,17 +206,15 @@ template class Product * \returns whether it is worth it to use the cache friendly product. */ inline bool _useCacheFriendlyProduct() const { - return _rows()>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD - && _cols()>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD + return rows()>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD + && cols()>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD && m_lhs.cols()>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD; } - private: + inline int rows() const { return m_lhs.rows(); } + inline int cols() const { return m_rhs.cols(); } - inline int _rows() const { return m_lhs.rows(); } - inline int _cols() const { return m_rhs.cols(); } - - const Scalar _coeff(int row, int col) const + const Scalar coeff(int row, int col) const { Scalar res; ScalarCoeffImpl::run(row, col, m_lhs, m_rhs, res); @@ -226,7 +224,7 @@ template class Product /* Allow index-based non-packet access. It is impossible though to allow index-based packed access, * which is why we don't set the LinearAccessBit. */ - const Scalar _coeff(int index) const + const Scalar coeff(int index) const { Scalar res; const int row = RowsAtCompileTime == 1 ? 0 : index; @@ -236,7 +234,7 @@ template class Product } template - const PacketScalar _packet(int row, int col) const + const PacketScalar packet(int row, int col) const { PacketScalar res; ei_product_packet_impl::_cacheFriendlyEvalAndAdd(DestDerived& LhsCopy lhs(m_lhs); RhsCopy rhs(m_rhs); ei_cache_friendly_product( - _rows(), _cols(), lhs.cols(), + rows(), cols(), lhs.cols(), _LhsCopy::Flags&RowMajorBit, &(lhs.const_cast_derived().coeffRef(0,0)), lhs.stride(), _RhsCopy::Flags&RowMajorBit, &(rhs.const_cast_derived().coeffRef(0,0)), rhs.stride(), Flags&RowMajorBit, &(res.coeffRef(0,0)), res.stride() diff --git a/Eigen/src/Core/Transpose.h b/Eigen/src/Core/Transpose.h index ddac5fa63..f19d4affa 100644 --- a/Eigen/src/Core/Transpose.h +++ b/Eigen/src/Core/Transpose.h @@ -67,31 +67,29 @@ template class Transpose EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Transpose) - private: + inline int rows() const { return m_matrix.cols(); } + inline int cols() const { return m_matrix.rows(); } - inline int _rows() const { return m_matrix.cols(); } - inline int _cols() const { return m_matrix.rows(); } + inline int stride(void) const { return m_matrix.stride(); } - inline int _stride(void) const { return m_matrix.stride(); } - - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { return m_matrix.const_cast_derived().coeffRef(col, row); } - inline const Scalar _coeff(int row, int col) const + inline const Scalar coeff(int row, int col) const { return m_matrix.coeff(col, row); } template - inline const PacketScalar _packet(int row, int col) const + inline const PacketScalar packet(int row, int col) const { return m_matrix.template packet(col, row); } template - inline void _writePacket(int row, int col, const PacketScalar& x) + inline void writePacket(int row, int col, const PacketScalar& x) { m_matrix.const_cast_derived().template writePacket(col, row, x); } diff --git a/Eigen/src/LU/Inverse.h b/Eigen/src/LU/Inverse.h index e8d81a991..a4f703383 100644 --- a/Eigen/src/LU/Inverse.h +++ b/Eigen/src/LU/Inverse.h @@ -76,18 +76,16 @@ template class Inverse : ei_no_assignm */ bool exists() const { assert(CheckExistence); return m_exists; } - private: + int rows() const { return m_inverse.rows(); } + int cols() const { return m_inverse.cols(); } - int _rows() const { return m_inverse.rows(); } - int _cols() const { return m_inverse.cols(); } - - const Scalar _coeff(int row, int col) const + const Scalar coeff(int row, int col) const { return m_inverse.coeff(row, col); } template - PacketScalar _packet(int row, int col) const + PacketScalar packet(int row, int col) const { return m_inverse.template packet(row, col); } diff --git a/Eigen/src/Sparse/SparseMatrix.h b/Eigen/src/Sparse/SparseMatrix.h index 74a85da0d..d3ee6e3b1 100644 --- a/Eigen/src/Sparse/SparseMatrix.h +++ b/Eigen/src/Sparse/SparseMatrix.h @@ -63,10 +63,10 @@ class SparseMatrix : public MatrixBase > int m_rows; int m_cols; - inline int _rows() const { return m_rows; } - inline int _cols() const { return m_cols; } + inline int rows() const { return m_rows; } + inline int cols() const { return m_cols; } - inline const Scalar& _coeff(int row, int col) const + inline const Scalar& coeff(int row, int col) const { int id = m_colPtrs[col]; int end = m_colPtrs[col+1]; @@ -79,7 +79,7 @@ class SparseMatrix : public MatrixBase > return m_data.value(id); } - inline Scalar& _coeffRef(int row, int col) + inline Scalar& coeffRef(int row, int col) { int id = m_colPtrs[cols]; int end = m_colPtrs[cols+1]; @@ -95,19 +95,19 @@ class SparseMatrix : public MatrixBase > class InnerIterator; - inline int rows() const { return _rows(); } - inline int cols() const { return _cols(); } + inline int rows() const { return rows(); } + inline int cols() const { return cols(); } /** \returns the number of non zero coefficients */ inline int nonZeros() const { return m_data.size(); } inline const Scalar& operator() (int row, int col) const { - return _coeff(row, col); + return coeff(row, col); } inline Scalar& operator() (int row, int col) { - return _coeffRef(row, col); + return coeffRef(row, col); } inline void startFill(int reserveSize = 1000)