Skip to content

Commit

Permalink
Changing DP.Polyvar -> DP.Variable as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanmg committed Nov 16, 2023
1 parent 7f81cf2 commit 0f07f17
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/contraction/JuMP.jl
Original file line number Diff line number Diff line change
@@ -105,7 +105,7 @@ function get_lagrange_polys(pts::Matrix{T}, deg::Int) where {T <: Real}
end

# returns the multivariate Chebyshev polynomials in x up to degree deg
function get_chebyshev_polys(x::Vector{DP.PolyVar{true}}, deg::Int)
function get_chebyshev_polys(x::Vector{DP.Variable{true}}, deg::Int)
if deg > 8
@warn("get_chebyshev_polys is not numerically stable for large degree")
end
@@ -124,7 +124,7 @@ function get_chebyshev_polys(x::Vector{DP.PolyVar{true}}, deg::Int)
return V
end

function get_chebyshev_univ(monovec::Vector{DP.PolyVar{true}}, deg::Int)
function get_chebyshev_univ(monovec::Vector{DP.Variable{true}}, deg::Int)
if deg > 8
@warn("get_chebyshev_univ is not numerically stable for large degree")
end
4 changes: 2 additions & 2 deletions examples/semidefinitepoly/JuMP.jl
Original file line number Diff line number Diff line change
@@ -15,15 +15,15 @@ import SumOfSquares
import PolyJuMP

struct SemidefinitePolyJuMP{T <: Real} <: ExampleInstanceJuMP{T}
x::Vector{<:DP.PolyVar}
x::Vector{<:DP.Variable}
H::Matrix{<:DP.Polynomial}
is_feas::Bool # whether model should be primal-dual feasible; only for testing
use_wsosmatrix::Bool # use wsosinterppossemideftri cone, else PSD formulation
use_dual::Bool # use dual formulation, else primal formulation
end

function SemidefinitePolyJuMP{Float64}(
x::Vector{DP.PolyVar{true}},
x::Vector{DP.Variable{true}},
poly::DP.Polynomial,
args...,
)

0 comments on commit 0f07f17

Please sign in to comment.