Open dtkaplan opened 3 years ago
@dtkaplan would it be useful to find a time to talk about this and any other related mosaic package suite issues?
Yes, absolutely. I'd love to talk about this and some of the things going on in the mosaicCalc world. Any time.
On Fri, May 28, 2021 at 10:36 AM Nicholas Horton @.***> wrote:
@dtkaplan https://github.com/dtkaplan would it be useful to find a time to talk about this and any other related mosaic package suite issues?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaicCalc/issues/9#issuecomment-850503006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECBLNMA7PMGOLUBL7IA43TP6Z6JANCNFSM437RURKA .
Can we find a time next week?
I'm teaching a workshop next week as part of the DSC-WAV project, so I can't meet next week.
That being said, I wonder if the two of you might start a discussion since I've not been as directly involved.
Perhaps just add a canonical_order(f)
which will re-arrange arguments according to (x, y, z, u, v, w, n, p, then alphabetical). Just use this in D()
.
Things are still a bit of a mess with the order of arguments created by
makeFun()
,D()
, andantiD()
. For instance,makeFun()
will use the symbols to the right of tilde as the arguments to the function created, in the order specified. But parameters might come in any order, depending on how the tilde expression is composed.D()
will insert its "with respect to" argument in the first argument position, which means thatD(x*y^2 ~x)
andD(x*y^2~y)
will have the arguments in different orders.I'm not entirely sure how to handle this in
D()
. Perhaps encourage a style where one writesf <- makeFun(x*y^2 ~ x + y)
and thenD(f(x,y) ~ y)
. [[Right now, this is awkward, becauseD()
doesn't know to look inside a non-standard function such asf()
for a symbolic formula. Instead, it applies numerical differentiation. Good to fix that.]] What's in the brackets is now fixed as of the conversion toDeriv::Deriv()
for the symbolic derivatives.But I'm thinking it might be nice to have an option in
makeFun()
that lets you writemakeFun(x*y^2 ~ .)
or similar, so thatmakeFun()
knows to choose a canonical ordering of the arguments.