[eigen] BandMatrix operator()

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


Hi

It seems that operator() is not implemented for BandMatrix.
I wrote my own, was wondering if it could be added.

    template <typename T>
    T & item (BandMatrix<T> & B, const uint i, const uint j) {
        eigen_assert(
            // 0 <= i && // enforced by type
            // j-B.supers() <= i && // enforced by storage format
            i < B.rows() &&
            i <= j+B.subs()
        );
        return B.coeffs()(B.supers()+i-j, j);
    }


Thanks,

krey

Sent from an iToaster.


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