diff --git a/src/Test/intlinear.jl b/src/Test/intlinear.jl index 0663fc8298..89368d217b 100644 --- a/src/Test/intlinear.jl +++ b/src/Test/intlinear.jl @@ -82,8 +82,6 @@ function int1test(model::MOI.ModelLike, config::TestConfig) end end -Base.isapprox(a::T, b::T; kwargs...) where T <: Union{MOI.SOS1, MOI.SOS2} = isapprox(a.weights, b.weights; kwargs...) - # sos from CPLEX.jl" begin function int2test(model::MOI.ModelLike, config::TestConfig) atol = config.atol diff --git a/src/sets.jl b/src/sets.jl index f9195c1b61..9e12d83b97 100644 --- a/src/sets.jl +++ b/src/sets.jl @@ -417,9 +417,6 @@ struct SOS1{T <: Real} <: AbstractVectorSet weights::Vector{T} end -Base.:(==)(a::SOS1{T}, b::SOS1{T}) where T = a.weights == b.weights -Base.isapprox(a::SOS1{T}, b::SOS1{T}; kwargs...) where T = isapprox(a.weights, b.weights; kwargs...) - """ SOS2{T <: Real}(weights::Vector{T}) @@ -433,12 +430,11 @@ struct SOS2{T <: Real} <: AbstractVectorSet weights::Vector{T} end -Base.:(==)(a::SOS2{T}, b::SOS2{T}) where T = a.weights == b.weights -Base.isapprox(a::SOS2{T}, b::SOS2{T}; kwargs...) where T = isapprox(a.weights, b.weights; kwargs...) +Base.:(==)(a::T, b::T) where {T <: Union{SOS1, SOS2}} = a.weights == b.weights +Base.isapprox(a::T, b::T; kwargs...) where {T <: Union{SOS1, SOS2}} = isapprox(a.weights, b.weights; kwargs...) dimension(s::Union{SOS1, SOS2}) = length(s.weights) - # isbits types, nothing to copy function Base.copy(set::Union{Reals, Zeros, Nonnegatives, Nonpositives, GreaterThan, LessThan, EqualTo, Interval,