[eigen] Proposal: add M.fill(y) as a synonym for M.setConstant(y) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Proposal: add M.fill(y) as a synonym for M.setConstant(y)
- From: Keir Mierle <mierle@xxxxxxxxx>
- Date: Fri, 23 Jan 2009 14:41:55 -0800
- 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=CD7KMrmYQf6H03bGtJ+FABeyMGO+ZdTp8TydvdaKewI=; b=t2Fy/jyvTThMAnkmZMycRLc3H8IpZU7yeF71BnM3fTqyPh1e5mUHvgnBtruIi/8GxV 6ObrezVFlEDbEhGvvwlyENWnXWS5ydOndlWkhgq/fksi6RpVUXnPLdDWExLw706a95RY XuzqYrg6ceh+MSW8XFrbQh9L8i3fP1AiuK1Bk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=l7VD6l4qZXpcj3ZiFohQYiNYQcUFbRwE169EX7et8/KCnEeWMYMs4SBxJLjPySbNfT 4GzFuXP7MxD2y22yaGsVe3THZZw+O/Hu0+uwTIsx5Q3rqPXItOkgqG4cCDM0fVrThTVe CPJBYX6Zb2eeVRMC4SeSFkA00IusLDaZcHe9o=
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