aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/DiagonalMatrix.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-01-11 15:08:04 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-01-11 15:08:04 +0000
commite092cbc75cadef1158d43f07b32e4ae0bf9372e2 (patch)
treef95fb0f3e6c36c6e6badbed4fcd8d136b8483880 /Eigen/src/Core/DiagonalMatrix.h
parentaae0667e1e120b5809a7e2fe442d67832ff9ed0f (diff)
-add set...() methods and their documentation; remove Generic
-use row-major traversal when the number of columns is fixed and the number of rows is dynamic -other minor changes
Diffstat (limited to 'Eigen/src/Core/DiagonalMatrix.h')
-rw-r--r--Eigen/src/Core/DiagonalMatrix.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h
index b36bce15a..c1031d032 100644
--- a/Eigen/src/Core/DiagonalMatrix.h
+++ b/Eigen/src/Core/DiagonalMatrix.h
@@ -52,7 +52,7 @@ class DiagonalMatrix : NoOperatorEquals,
DiagonalMatrix(const CoeffsVecRef& coeffs) : m_coeffs(coeffs)
{
assert(CoeffsVectorType::Traits::IsVectorAtCompileTime
- && coeffs.coeffs() > 0);
+ && coeffs.size() > 0);
}
private:
@@ -62,8 +62,8 @@ class DiagonalMatrix : NoOperatorEquals,
};
const DiagonalMatrix& _ref() const { return *this; }
- int _rows() const { return m_coeffs.coeffs(); }
- int _cols() const { return m_coeffs.coeffs(); }
+ int _rows() const { return m_coeffs.size(); }
+ int _cols() const { return m_coeffs.size(); }
Scalar _coeff(int row, int col) const
{
@@ -71,7 +71,7 @@ class DiagonalMatrix : NoOperatorEquals,
}
protected:
- CoeffsVecRef m_coeffs;
+ const CoeffsVecRef m_coeffs;
};
/** \returns an expression of a diagonal matrix with *this as vector of diagonal coefficients