Re: [eigen] New indexing/slicing API: almost ready to be merged

[ Thread Index | Date Index | More Archives ]

On Thu, Jan 12, 2017 at 10:34 AM, Massimiliano Janes <max.jns@xxxxxxxxx> wrote:

> On 11 Jan 2017, at 22:13, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
> However I don't see how to generalize it to multi-dimensional tensors

a workaround could be requiring users to wrap *all* arguments into braces in this case:

A( {all}, {1,2,3} )
A( {1,2,3}, { all }, {5,6,7}, { seq(2,4) } )

eventually providing braceless overloads only for <=2d

being able to write A({5,6,7}) is nice but I don't think people will use it that much beyond prototyping/debugging. I think a user defined n alias to std::make_array({5,6,7}) (perhaps for c++17??) is a saner option. Say:

A(....., _{2,3,4}, ....)


Mail converted by MHonArc 2.6.19+