[eigen] .matrix()/.array() on MatrixBase<Derived>/ArrayBased<Derived>

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

any objections against these null cost functions:

MatrixBase:
    MatrixBase<Derived>& matrix() { return *this; }
    const MatrixBase<Derived>& matrix() const { return *this; }

and the corresponding array() ones for ArrayBase.

When writing functions taking DenseBase<Derived> or any functions that
will take Array as well as Matrix, this is quite handy. You don't know
whether you need to convert or not, so you just do it when you want
array or matrix ops respectively.

- Hauke



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/