Re: [eigen] type of comma initializer ?

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


Hi,

(A << 1)

returns a CommaInitializer<typeof(A)> which stores a reference to A
and fill it through the comma operator.

So basically, you cannot write such a Mat_init function.

I'm a bit puzzled by what would be the use case for that ?

gael


On Wed, Jan 12, 2011 at 11:43 AM, Helmut Jarausch
<jarausch@xxxxxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I'd like to put the initialization of a Matrix like
>
> Matrix<int,3,1> A;
>
> A << 1,2,3;
>
> into a function. I'd like to pass the object "1,2,3" as a parameter.
> What's the type of this expression. Or, what to fill in for
> <UNKNOWN_TYPE> below?
>
> void Mat_init(Matrix<int,3,1>& X, <UNKNOWN_TYPE>&  Ini) {
>  X << Ini;
> }
>
> Many thanks for a hint,
> Helmut.
>
>
>



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