Re: [eigen] type of comma initializer ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] type of comma initializer ?
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Wed, 12 Jan 2011 11:59:54 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=4kcPz9YeDKj9fA/nEYgrfDDjkMeIKJJ6KdaCMnjxrJ4=; b=EBJUlws7JLs0tfsmxzIqcevDCzMQcoSMf/oBU4hAs9ixq+L6fRAMIgW2jjVzTwGSmt TNDaAm1ncZoZNhlokSVc126Q8KxQSq6j3xytY617tla+JnTcpZXfNqGVDkRbDUoeMj2Z a3B1Q1sSL5IcmMbv7aCDDLijw5UuVUqPBsaao=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=sGlm5UGpPXDQJ0x3s3SFZKb5z1x/wRBoRTnViMTOG9+d/5d4vgh1Q56PV6qRwbjP2C dohGRRva++9iCIUOTFKm+hxwcRUeiB6RWHBCQJzepSdAxBkq/a3JkendKC11WGdNKyMg BxMUscoYDKUh2nO9+PEYirvTdMj+SR89jMDIY=
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.
>
>
>