Skip to content

Commit

Permalink
correct creation of empty HPolygon/HPolytope
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Apr 5, 2018
1 parent 24c5ad2 commit c5a6ee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/HPolygon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct HPolygon{N<:Real} <: AbstractHPolygon{N}
constraints::Vector{LinearConstraint{N}}
end
# constructor for an HPolygon with no constraints
HPolygon{N}() where {N<:Real} = HPolygon{N}(Vector{N}(0))
HPolygon{N}() where {N<:Real} = HPolygon{N}(Vector{LinearConstraint{N}}(0))

# constructor for an HPolygon with no constraints of type Float64
HPolygon() = HPolygon{Float64}()
Expand Down
2 changes: 1 addition & 1 deletion src/HPolytope.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct HPolytope{N<:Real} <: AbstractPolytope{N}
constraints::Vector{LinearConstraint{N}}
end
# constructor for a HPolytope with no constraints
HPolytope{N}() where {N<:Real} = HPolytope{N}(Vector{N}(0))
HPolytope{N}() where {N<:Real} = HPolytope{N}(Vector{LinearConstraint{N}}(0))

# constructor for a HPolytope with no constraints of type Float64
HPolytope() = HPolytope{Float64}()
Expand Down

0 comments on commit c5a6ee1

Please sign in to comment.