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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 24 Jun 2009 20:26:09 +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 :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=OjV7uzbGMsb8ELV46qENk9mRgSBKRpQ+DvbhsYioAEg=; b=nlJrK/l6to44oLNkb1z9imCCeUjDunxcPFEOSevpYYBvOdVb/6vfhCfZYBVwoZDEGc Ge2SOOTImurNaxz86KuDlRnLKdVstXZnZPLTMK4RKVXRR7IU9XyIiTAbR2ErI+idX2Kq mZbJDf7KlKa0m1AXT8oSG6Sk2yrAI0S3EEVi4=
- 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=cgYX8GSDR3b+20Xa7PHcaBPCyCMRmiAffk8oAqUROwTHAuGDILoQoaS1XEXISS1YQw iURkd26Dia99f/FEyfrOo3TmD6vcehF9do8DwhVQKLRIxYedLI555mLCFaWUr86+B8yR ILqdj13WaVTDAOnBziYVCH+HuIXLIw05KTix0=
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