Re: [eigen] Feature suggestion: interior row and column ranges [patch attached]

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


As you said: Ideally the naming is clash free, consistent and of little surprise. Because I didn't know Eigen or the English language well enough I'm totally undecided.

But let me post some Sunday morning thoughts:

geometric names:
topRows - middleRows - bottomRows,   leftCols - middleCols - rightCols

block names:
topRows - blockRows - bottomRows,         leftCols - blockCols - rightCols

sequential names:
startRows - innerRows - endRows,    startCols - innerCols - endCols
or
firstRows - middleRows - lastRows,    firstCols - middleCols - lastCols

oldie names: headRows - ???Rows - tailRows

What, if there are range expression object types? Would that be possible w/o runtime costs?:
Something in the lines of:
blockRange<startrow, endrow, startcol, endcol> brange
indexRange<start, end> irange

   topRows(3)   -> blockRange brange1(1,3,Dynamic,Dynamic)
bottomRows(3)   -> blockRange brange2(-3,-1,Dynamic,Dynamic)
 innerRows(3,2) -> blockRange brange3(3,3+2,Dynamic, Dynamic)

=>
cout << "A(3..5,:) =\n" << A(brange3) << endl;
or
indexRange<3,2> irange1;
cout << "A(3..5,:) =\n" << A.rows(irange1) << endl;

Cheers
Frank

P.S.
I'm eager



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