aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/DenseStorageBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/DenseStorageBase.h')
-rw-r--r--Eigen/src/Core/DenseStorageBase.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/Eigen/src/Core/DenseStorageBase.h b/Eigen/src/Core/DenseStorageBase.h
index 6245b8007..89e6e7112 100644
--- a/Eigen/src/Core/DenseStorageBase.h
+++ b/Eigen/src/Core/DenseStorageBase.h
@@ -75,23 +75,6 @@ class DenseStorageBase : public _Base<Derived>
EIGEN_STRONG_INLINE int rows() const { return m_storage.rows(); }
EIGEN_STRONG_INLINE int cols() const { return m_storage.cols(); }
- /** Returns the leading dimension (for matrices) or the increment (for vectors) to be used with data().
- *
- * More precisely:
- * - for a column major matrix it returns the number of elements between two successive columns
- * - for a row major matrix it returns the number of elements between two successive rows
- * - for a vector it returns the number of elements between two successive coefficients
- * This function has to be used together with the MapBase::data() function.
- *
- * \sa data() */
- EIGEN_STRONG_INLINE int stride() const
- {
- if(IsVectorAtCompileTime)
- return 1;
- else
- return (Flags & RowMajorBit) ? m_storage.cols() : m_storage.rows();
- }
-
EIGEN_STRONG_INLINE const Scalar& coeff(int row, int col) const
{
if(Flags & RowMajorBit)
@@ -253,12 +236,12 @@ class DenseStorageBase : public _Base<Derived>
{
if(RowsAtCompileTime == 1)
{
- ei_assert(other.isVector());
+ ei_assert(other.rows() == 1 || other.cols() == 1);
resize(1, other.size());
}
else if(ColsAtCompileTime == 1)
{
- ei_assert(other.isVector());
+ ei_assert(other.rows() == 1 || other.cols() == 1);
resize(other.size(), 1);
}
else resize(other.rows(), other.cols());