You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but I think it will be more general if the dest and f!(dest, istate.prev) happen inside the update! call. I may not have a single parameter vector that I want to update in this fashion, and it may be non-trivial or inefficient to make a f! method of this form.
We can add convenience managers/states to reproduce the same form above, but the core loop is more general. Also, we can just have both forms and let multiple dispatch work.
The text was updated successfully, but these errors were encountered:
@tbreloff thanks for the idea -- overall I like it.
As a little background, my initial goal with the package was to do two things:
Provide mechanisms that are as general as possible and...
Wrap these mechanisms in a way that exposes APIs that range from very automatic (like that one-line version of Newton's method example in the read me) to giving the user 100% control over whatever aspects he/she wants to customize.
I think the current version I have does well at bringing out the "automatic" part of point (2) as it doesn't require the user to define their own types and abstracts away how instances of IterationManager and IterationState need to interact.
I think your proposal does better at both point (1) -- being more general -- and the full control part of point (2). With that in mind I think we should definitely pursue something like what you proposed here.
Aside: I'm fairly happy with those 2 design goals, but would be happy to hear suggestions for revisions. I think clear design goals are important as I feel that once we have those, building the API around them should be easier.
+1 to your design goals. I won't have much time this week, but I'll prepare a PR to add this when I have a chance. I'll keep what you have already and will only remove it if/when I have a feature-complete replacement. Thanks.
Currently a managed iteration takes the form:
but I think it will be more general if the
dest
andf!(dest, istate.prev)
happen inside theupdate!
call. I may not have a single parameter vector that I want to update in this fashion, and it may be non-trivial or inefficient to make af!
method of this form.My proposal:
We can add convenience managers/states to reproduce the same form above, but the core loop is more general. Also, we can just have both forms and let multiple dispatch work.
The text was updated successfully, but these errors were encountered: