Skip to content

Commit

Permalink
remove conversion for HalfSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed May 30, 2019
1 parent 8ec6697 commit 9ba0f85
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/HalfSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ struct HalfSpace{N<:Real, VN<:AbstractVector{N}} <: AbstractPolyhedron{N}
b::N
end

function convert(::Type{HalfSpace{N, VN}}, hs::HalfSpace{T, VT}
) where {N<:Real, VN<:AbstractVector{N}, T, VT<:AbstractVector{T}}
return HalfSpace{N, VN}(convert(VN, hs.a), convert(N, hs.b))
end

"""
LinearConstraint
Expand Down
5 changes: 0 additions & 5 deletions test/unit_HalfSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ for N in [Float64, Rational{Int}, Float32]
# normal constructor
hs = HalfSpace(ones(N, 3), N(5))

# numeric-type conversion preserves vector base type
hs1 = HalfSpace(spzeros(4), 1.)
hs2 = convert(HalfSpace{N}, hs1)
@test hs2.a isa SparseVector{N}

# dimension
@test dim(hs) == 3

Expand Down

0 comments on commit 9ba0f85

Please sign in to comment.