File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 11export Poly
22
3- function JuMP. value (t:: AbstractTerm{<:JuMP.AbstractJuMPScalar} )
4- JuMP. value (coefficient (t)) * monomial (t)
3+ function JuMP. value (
4+ t:: AbstractTerm{<:JuMP.AbstractJuMPScalar} ,
5+ f:: Function = JuMP. value,
6+ )
7+ return JuMP. value (MultivariatePolynomials. coefficient (t), f) * monomial (t)
58end
6- function JuMP. value (p:: AbstractPolynomialLike{<:JuMP.AbstractJuMPScalar} )
7- polynomial (JuMP. value .(terms (p)), MultivariatePolynomials. SortedUniqState ())
9+ function JuMP. value (
10+ p:: AbstractPolynomialLike{<:JuMP.AbstractJuMPScalar} ,
11+ f:: Function = JuMP. value,
12+ )
13+ return polynomial (
14+ JuMP. value .(terms (p), f),
15+ MultivariatePolynomials. SortedUniqState (),
16+ )
817end
918
1019abstract type AbstractPoly end
Original file line number Diff line number Diff line change 9393 JuMP. fix (α, 2 )
9494 JuMP. fix (β, 3 )
9595 @test_broken JuMP. value (p) == 2 x* y + 3 x^ 2
96+ @test JuMP. value (p, fix_value) == 2 x* y + 3 x^ 2
9697end
You can’t perform that action at this time.
0 commit comments