-
Notifications
You must be signed in to change notification settings - Fork 5
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
preallocate stats #25
Conversation
Codecov Report
@@ Coverage Diff @@
## main #25 +/- ##
==========================================
- Coverage 88.67% 88.46% -0.22%
==========================================
Files 3 3
Lines 106 104 -2
==========================================
- Hits 94 92 -2
Misses 12 12
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Should we have a flag to let the user know if the solution
and multipliers
were touched? Along with a reset!
method.
What would |
The |
I'm not sure I see the point of resetting the stats structure. Either it comes out a solve, and in that case it holds the solve info, or it's passed to I don't see how to reset solver specific stuff, since only the solver knows what to do with that info. |
Thanks guys! |
The flags are useful in particular for the contained solvers that don't touch the multipliers. That means that the solver needs to let the user know that the |
In what situation would that occur? Presumably, the user knows if they're solving a constrained or unconstrained problem. |
The solver is for constrained optimization but does not give an estimate of the multipliers because it uses something different. |
Ok, like TRON or the nonsmooth solvers.I'll add that. |
The objective of this PR is to preallocate the contents of the stats so they can be passed in to a solver for a re-solve, and so we can say something like
stats.solution .= x
to update the solution.cf: #3
cc @sshin23