Re: [eigen] On a flexible API for submatrices, slicing, indexing, masking, etc. |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
a + iota * s | until(b) = seq(a, b, s)BTW we are sort of revisiting the "named parameter" API:Iota == Count"A+" == Start"*S" == Incr"until(b)" == LastA few key advantages:- optional argument with default values can just be omitted.- no confusion on ordering of parameter.- the whole _expression_ has a well-defined meaning. It can be seen a special case of indexing with a concrete vector.- at least for "Count" and "Last", we can omit fixed<N>, and just write iota<Count> and until<Last>.
(1 + iota * 3 | until(10) | every(2)) + 4 | reverse = (1 + [0, 3, 6, ...] | until(10) | every(2)) + 4 | reverse = ([1, 4, 7, 10] | every(2)) + 4 | reverse = [1, 7] + 4 | reverse = [5, 12] | reverse = [12, 5]
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |