[eigen] better name for triangularView<UpperTriangular>() ?

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


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



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