Re: [eigen] How to squeeze in place a vector matrix

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


2010/8/25 Bastien ROUCARIES <roucaries.bastien@xxxxxxxxx>:
> On Wed, Aug 25, 2010 at 4:18 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> 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.
>
> Because it is really really useful removing null space on eigenvector
> decomposition** ?

I wasn't questioning the interest of removing null parts of matrices :-)
I was saying that the behavior on why my trick above is relying,
though undocumented, is unlikely to change.

Cheers
Benoit

> In fact I need to punch out a column/line pair, and it will be really
> nice to have a function to punch out in place.
>
> As you should know null space is evil* :)
>
> Bastien
>
> * from a physical point of view :) In fact I am working on the
> solution of Ax=lambda B x, and null space does not carry physical
> signification and the devil from a numerical point of view
> **  computing the resonnance of some physical system. Null space is
> due overdetermined limit conidtion
>
>
>



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