aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/DiagonalCoeffs.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-06-26 20:08:16 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-06-26 20:08:16 +0000
commitc5bd1703cb05f60a00f948a222e3d61eaf7ab5ad (patch)
treeb52758c0b2b6b7f609777e40152c8ae48d37d6a5 /Eigen/src/Core/DiagonalCoeffs.h
parent25ba9f377c97968923cd654d419fa8ce260f114d (diff)
change derived classes methods from "private:_method()"
to "public:method()" i.e. reimplementing the generic method() from MatrixBase. improves compilation speed by 7%, reduces almost by half the call depth of trivial functions, making gcc errors and application backtraces nicer...
Diffstat (limited to 'Eigen/src/Core/DiagonalCoeffs.h')
-rw-r--r--Eigen/src/Core/DiagonalCoeffs.h14
1 files changed, 6 insertions, 8 deletions
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<typename MatrixType> 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);
}