[eigen] better name for triangularView<UpperTriangular>() ? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] better name for triangularView<UpperTriangular>() ?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 20 Nov 2009 10:38:20 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=GT7tH1a01P032+zSJZH07dhIV3C5iUNkH1YxJgQJMiE=; b=J4B0ZQ/pR8s3Fbq2FTXlLZY18S7QxXxGAgvu6Log4p/9W6RNntXbxngdSOjCBf5vQN atRnkgGLoG+BkkgKJZxojmO7Z8VX5b3mQGg8QQJNDJH7Gf1gGS+aPf9B15YtqWd8HCgy pEJubSyaqefdTRusaKayeKichyUAh7eBJPjQM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PQeZ6YkMMTY4yucX+iU6uTN67gee41fgk5aV2xaXB/eMaoyv7V8j521i9+aJj+I5Ve ZDqshLTHyCVfzBmAQ6497Z6TXjF8Wm6sI6EzGOeYeIzlptCA9gSnV9NzVvD0qrZq71cd N+iox2xU2aEaoswRVceTsOlfd9PRSqWMmkp9Q=
Hi,
currently, our API is:
matrix.triangularView<UpperTriangular>()
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:
matrix.triangularView<Upper>()
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:
matrix.view<UpperTriangular>()
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
matrix.strictLowerTriangle()
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
Opinions?
Benoit