aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/ArrayWrapper.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2012-08-30 16:28:53 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2012-08-30 16:28:53 +0200
commit9da41cc527ec595feb3377d089db6cd3adc9a5c8 (patch)
tree44a736bfa11cc7a0e1eed753a0de1b42cd5fe01c /Eigen/src/Core/ArrayWrapper.h
parentc5031edb923504e2f47b26335ad335b874d38d2d (diff)
forward resize() function from Array/Matrix-Wrapper to the nested expression such that mat.array().resize(a,b) is now allowed.
Diffstat (limited to 'Eigen/src/Core/ArrayWrapper.h')
-rw-r--r--Eigen/src/Core/ArrayWrapper.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h
index 8774b8b29..1e021b0b9 100644
--- a/Eigen/src/Core/ArrayWrapper.h
+++ b/Eigen/src/Core/ArrayWrapper.h
@@ -121,6 +121,13 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> >
return m_expression;
}
+ /** Forwards the resizing request to the nested expression
+ * \sa DenseBase::resize(Index) */
+ void resize(Index newSize) { m_expression.const_cast_derived().resize(newSize); }
+ /** Forwards the resizing request to the nested expression
+ * \sa DenseBase::resize(Index,Index)*/
+ void resize(Index nbRows, Index nbCols) { m_expression.const_cast_derived().resize(nbRows,nbCols); }
+
protected:
NestedExpressionType m_expression;
};
@@ -231,6 +238,13 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
return m_expression;
}
+ /** Forwards the resizing request to the nested expression
+ * \sa DenseBase::resize(Index) */
+ void resize(Index newSize) { m_expression.const_cast_derived().resize(newSize); }
+ /** Forwards the resizing request to the nested expression
+ * \sa DenseBase::resize(Index,Index)*/
+ void resize(Index nbRows, Index nbCols) { m_expression.const_cast_derived().resize(nbRows,nbCols); }
+
protected:
NestedExpressionType m_expression;
};