Re: [eigen] Eigen "views"
• To: eigen@xxxxxxxxxxxxxxxxxxx
• Subject: Re: [eigen] Eigen "views"
• From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
• Date: Tue, 16 Aug 2011 18:09:18 +0200
• Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=C7dq21sihPBe/FRO6Ftj+zwRMX3altT7DKZgMOCy950=; b=XgkDH2lg725oLoIydV0KmPhV34oZb5+hZF2xfh6oxK3JdFt3ytPjCRC6EY0MBnAGyp KgeikGs0rR+3RTcca99SdEL9cVZFvIdKc644L2Uj8nD4OMXRItb59HwGsevvm2xlFNJR Tu1IYz03yR4UFDLxUY8JZepPvQlZCblWjW30E=

```On Tue, Aug 16, 2011 at 3:01 PM, Christoph Hertzberg
<chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> On 16.08.2011 08:41, Gael Guennebaud wrote:
>>
>> there are some major differences though:
>>
>> With PermutationMatrix you can do transposed products.
>>
>> With such views you can repeat a row (or column) multiple times,
>> remove some, etc.
>>
>> The conclusion is that though there is a non null intersection none of
>> them is a subset of the other one.
>
> Maybe I'm missing something, but I would say this means that permutation
> matrices _are_ a subset of views. I guess internally you store permutation
> matrices exactly as you would store views, i.e. by a vector of indexes,
> don't you?

right, my mistake.

gael

> I would even say that (in a limited way) transposed products with views are
> also possible. Having a permutation matrix P, with corresponding indexes p
> (P = I(:,p);) one can write in Matlab notation:
>
> B = A*P,  or B     = A(:,p);
> B = A*P', or B(:,p)= A;
> B = P*A,  or B(p,:)= A;
> B = P'*A, or B     = A(p,:);
>
> assuming all dimensions agree, and I did not mix anything up.
> That means at least the expressions A*P and P'*A are equivalent if P is just
> a view.
> The question would be what should happen with expressions such as
> B(:,p) = ...;
> if indexes in p are not unique. Matlab, as it seems, then uses the last
> corresponding entry of p, i.e., it basically just overwrites the row/column
> every time.
>
>
> Christoph
>
>
> --
> ----------------------------------------------
> Dipl.-Inf. Christoph Hertzberg
> Cartesium 0.051
> Universität Bremen
> Enrique-Schmidt-Straße 5
> 28359 Bremen
>
> Tel: (+49) 421-218-64252
> ----------------------------------------------
>
>
>

```

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