Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc.

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


Hi there,
I did not follow the whole discussion (no time) but I wanted to share some idea (may have come up already, or may be utterly useless ;P, or might not work at all :D):

what about user defined literals?

i could imagine the following syntax for slicing:

MatrixXD foo = ..;
std::cout << foo[':'_S,"0:4"_S]   << std::endl;

I.e. use user defined literals to convert ':' with _S to a "slicing descriptor". Maybe this can be combined with constexpr construction of a the descriptor, yielding more compile time diagnostics.
As said before, maybe that's just not useful :D

Hth, Martin


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