|[eigen] Re: better name for triangularView<UpperTriangular>() ?|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Re: better name for triangularView<UpperTriangular>() ?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 20 Nov 2009 10:44:39 -0500
- 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=iRxDR8QNmf9qFqI4i4RlfENCepcep8U6Fmi9fZBzFng=; b=UZiVyTHarDiIKDYeqc4SmDcBrcueF4vxTWVUMd6/ANGrA7nvlO5I3mbLKeGX0C9Xey S0xUTstIXUVPQrv0GxDUS+Fb7ZKL7TDuYaI9VVo0d7gfkhqz+WMwn6hN+OswV+JM4w8O AMTEwb/BL2sihkrBBXFlGoj4OKA1wCQ/KUPkY=
- 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=gtAs3Ng8T2iwDOVc4Vbm175gmEJBc5GwSMGn6cQNIVyWKXk08MiTs0wEfyPExDo1Hl ls3LYqO8wA0l96GiC7I7K5hwCK1fh+Lhaqib7slstJsp7mSQJLImvHvnDM8+bz3yV6y2 bbLlmujGZNIM8x697apz3LXcDtNeYlMdiw/iw=
i prefer 3) because increasing by +5 the number of methods in
MatrixBase is not a huge disadvantage, this is an essential feature,
this gives the cutest syntax (there is no use anyway for determining
the triangular view type as a parameter) and the difference is even
bigger in cases where the other solutions require a ".template"
2009/11/20 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> currently, our API is:
> with other constants like StrictlyLowerTriangular, UnitUpperTriangular, etc.
> Main problem to discuss: "triangle" is repeated.
> Solutions include:
> 1) (Gael's old proposal) rename UpperTriangle ---> Upper, so we do:
> pro: still only 1 method triangle() in MatrixBase
> con: Upper is not explicit enough
> 2) rename the triangularView<>() method to something short and generic
> like "view", so we do:
> pro: no polluting constant Upper
> con: introduce big all-purpose method 'view' which you might or might not like
> 3) replace triangularView() by 6 methods in MatrixBase:
> matrix.upperTriangle() // or upperTriangularView if you prefer
> In this solution it's rather important to abbreviate triangularview
> ---> triangle, i think.
> pro: no polluting constant, no all-purpose method if you don't like that
> con: replace that 1 method by 6 methods in MatrixBase, which you
> might not like