Re: [eigen] How to resize a partially fixed matrix |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] How to resize a partially fixed matrix
- From: Márton Danóczy <marton78@xxxxxxxxx>
- Date: Wed, 24 Jun 2009 20:27:48 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=l+wA06gn3GGyPmb6SodHDl9w5qtm99DC593uCcRE7c4=; b=IlyBsG6r1UBrl34O5PTX5xKcayVzDKyqM/ZYLNVi99LApY/3AfrMvgAxhf4pCGXJ3X UxZcmIzyWkjJAqorwaaszVjE2gf8BaalpOtHBhE9iwgMwJpj7M6LLc1lZ9uXzPHJxLP8 AgRACJgbrwNhfCAAUAhAD+VeSj03lRBIG8Th0=
- 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=OQf/KvOppm+IpM05hufz8JzuvM7UBBZBdCU66uw0btVKqQ++VHKFTlwSPEgIdBvYBq NKoZA/apxyW8YFYDRTku3Kv/sntDzHBUhEguWLh3iIrYicnwVfLZ0AcoLaZ2tLUiGkh6 oZUar8AYpux5u59h9myPso+TRclw0hE9QSUYE=
What about .colwise().resize() / .rowwise().resize()?
2009/6/24 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> 2009/6/24 Robert Bocquier <robert.bocquier@xxxxxxxxxxx>:
>> How about a new escape constant "NoChange" (or whatever name fits), use that
>> way :
>>
>> A.resize(NoChange, 7);
>
> That would require more runtime if's in resize(), hence a constant
> overhead, so i'm a bit reluctant.
>
> roooh but while writing this i had an idea:
>
> how about separate resizeHoriz(int) and resizeVert() functions ???
> It seems to me that this adresses the original request and yours simultaneously!
>
> In fact this is a just modification of your idea:
> NoChange as parameter ---> NoChange as template parameter ----> separate methods
>
> What do you think?
> Also for the names I don't know... initially i thought resizeRows(int)
> but that is ambiguous, it could mean either "change the number of
> rows" or "resize the rows"... other possibility:
> setRows() // goes well with the accessor method rows()
>
> Opinions?
>
> Benoit
>
>
>