-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation needs to be added #293
Comments
MutableArithmetics is not something that we necessarily expect third-parties to widely implement. What is the motivation and where would it be used? |
GTPSA.jl (which I maintain) and ADOLC.jl are both automatic differentiation libraries where the number types are mutable (because they wrap C/C++ libraries). And also bmad-sim/GTPSA.jl#113 .
Why not? Isn't this point of an interface package? |
FWIW, this is an incomplete list of function to which methods may be added by user packages, as far as I know:
|
Because it requires making the type a This really makes sense only if MA is used as part of some larger interface like JuMP. Just implementing this interface won't make user-code faster. I don't know if I understand why this would be useful for ADOLC. |
That's not necessary when defining
The way I see it, MA provides a single interface that's generic enough to be suitable for avoiding unnecessary allocation with all mutable types. A single interface is pretty great as opposed to an unlimited number of such designs, because then users of these (optionally) mutating operations don't have to learn a new interface for each package, and it allows better code composition. |
Perhaps I'll let @blegat speak to whether it is a good fit because this package is really his. But note that MA is not really a generic interface for all mutable types. It's really specialized for the types of operations that occur when building linear and quadratic expressions, such as those in JuMP or the various polynomial packages. |
Yes all I need to do is define the
While I'm not super familiar with ADOLC, on the surface it seems very similar to GTPSA; a Julia interface to a C-based automatic differentiation library. In this case, the number types are mutable. From this alone, one could define a buffer of preallocated number types and when temporaries in an expression are needed, use from that buffer. GTPSA goes further in that many operations also allow aliasing (e.g. Currently in GTPSA, the mutability of the truncated power series in GTPSA The best solution, in my opinion, would be to generalize |
The lack of documentation is a known issue, @kalmarek had the same comment in #286 The If you're only interested in allowing your type
The set of I think a tutorial in the docs should help, I'll try to find time to do this. Feel free to ask question in this thread as well, it will give me an idea of what kind of documentation is needed. |
It is an uphill battle figuring out how to implement this interface. The only documentation I can find on how to do so is hidden in this paper, but even that I find difficult to understand. There needs to be a step-by-step "for dummies" guide on how exactly to implement this interface on the Documenter site, covering everything I need to do
The text was updated successfully, but these errors were encountered: