Re: [eigen] How to squeeze in place a vector matrix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] How to squeeze in place a vector matrix
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 25 Aug 2010 10:18:30 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=TkbGx8Vjjt/uPMWlT89tXWc1K+tzt1kb5lF2+ech/wI=; b=f+M/rTGC5zBVfdLaluK0xBYRlHb4wd4831OrSKulYXTM2Etai5ypLgEniHJJshjrW9 34nmYyS9iSgsvYFFZlF22+o0YZDnntHfnYwtD3hVpuuNM+7Vhay5pQDWuDJ7Du2f9wIb WngvX2HZHvIsyOhzEJ5xMSmxne7quiVqJCqyo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CWrdeSNvwgXEPDkJUKWFoctrcJzK2WV5KEeYnmsAi5L6bflVhwxec+xluC2U5BH57G 1l3KUyNsolQuPH9twhzvkXZsUZHqn7px7TdyWH8/qUW795pDtP1d4uwGgo1o4kRx2j0A HMSyqUwAWGWQs4GbYHtCR6DOqJtYSUxTbw8QE=
2010/8/25 Bastien ROUCARIES <roucaries.bastien@xxxxxxxxx>:
> Hi,
>
> I want to squeeze some line and column of matrix in place, in order to
> remove the null space.
>
> How can I do that?
>
> I have tryied block(i,j,k,l).eval() but i think it is suboptimal
Ah, I see, trying to avoid aliasing issues.
In fact, in assignments, we are always traversing matrices
left-to-right and top-to-bottom.
So you can remove the eval() if you are a little careful. For example,
this works:
matrix.block(i,j,k,l) = matrix.block(i+1,j,k,l); // squeeze row i
Of course this is relying on undocumented behavior; but I really don't
see why we'd ever change this.
Benoit
>
> Bastien
>
>
>