[eigen] Proposal: add M.fill(y) as a synonym for M.setConstant(y)

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


I find the notation M.setConstant() odd, because in for example

double y = ... something not constant.
MatrixXd M = ...

M.setConstant(y)  // <--- y is not a constant!

I propose adding an alternate method:

M.fill(y)

It doesn't overload the meaning of constant, is shorter, and has obvious intent.

Thoughts?

Keir


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