-
Notifications
You must be signed in to change notification settings - Fork 0
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
Finish up TODOs in QV types #58
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #58 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 428 428
=========================================
Hits 428 428 ☔ View full report in Codecov by Sentry. |
/format |
✔️ Auto-formatting triggered by this comment succeeded, commited as 6acc986 |
Hmm getting a weird bug: julia> t = LinearValueT(Expression(2)) + QuadraticValueT(Expression(2))
ERROR: MethodError: no method matching QuadraticValueT{FastDifferentiation.Node}(::LinearValueT{FastDifferentiation.Node})
The type `QuadraticValueT{FastDifferentiation.Node}` exists, but no method is defined for this combination of argument types when trying to construct it.
Closest candidates are:
(::Type{QuadraticValueT{T}} where T)(::Any, ::Any)
@ ConstraintTrees C:\Users\stelmo\.julia\packages\ConstraintTrees\AhePm\src\quadratic_value.jl:34
QuadraticValueT{T}(; idxs, weights) where T
@ ConstraintTrees C:\Users\stelmo\.julia\packages\ConstraintTrees\AhePm\src\quadratic_value.jl:33
Stacktrace:
[1] +(a::LinearValueT{FastDifferentiation.Node}, b::QuadraticValueT{FastDifferentiation.Node})
@ ConstraintTrees C:\Users\stelmo\.julia\packages\ConstraintTrees\AhePm\src\quadratic_value.jl:100
[2] top-level scope
@ REPL[30]:1 |
I removed some (many) explicit UnionAlls. It seems to work now at least for: julia> C.LinearValueT(1) - C.QuadraticValueT(2)
ConstraintTrees.QuadraticValueT{Int64}([(0, 0)], [-1]) If something still fails we should have a test for it (so that there's something to make sure it stays fixed). |
PS we could do type promotion at the place for |
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.
LGTM but I expect this won't be sufficient.
Merging, and I will report back as I find stuff in Diffmet |
No description provided.