Re: [eigen] Custom expression type API stability |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Maybe a small follow-up to that, is it possible to append/prepend a value to
(cond_vec>0).select(choice_vec.head(n-1), choice_vec.tail(n-1)) ? I want to
extend this vector of length n-1 to length n, but not create an additional
vector along the way, so not something like this:
new_vec << 1, (cond_vec>0).select(choice_vec.head(n-1), choice_vec..tail(n-1))
Actually its a tad more complicated than that, since I want to take the choice
result, put it into head(n-1) add subtract it from tail(n-1) and add values to
the first and last element (while doing the same again with another
_expression_).
Is there an elegant/efficient way how to do this? Or would it be best to give
the function a reference to a result vector where to write the values into?
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |