Skip to content

Commit

Permalink
change type restriction for r
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianGuadalupe committed Oct 15, 2019
1 parent affce25 commit da0be0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Approximations/overapproximate.jl
Expand Up @@ -1318,7 +1318,7 @@ function overapproximate(cap::Intersection{N,
end

"""
overapproximate(Z::Zonotope{N}, ::Type{<:Zonotope}, r::Union{Int, Rational{Int}}) where {N<:Real}
overapproximate(Z::Zonotope{N}, ::Type{<:Zonotope}, r::Union{Integer, Rational}) where {N<:Real}
Reduce the order of a zonotope by overapproximating with a zonotope with less
generators.
Expand All @@ -1340,7 +1340,7 @@ This function implements the algorithm described in A. Girard's
If the desired order is smaller than one, the zonotope is *not* reduced.
"""
function overapproximate(Z::Zonotope{N}, ::Type{<:Zonotope}, r::Union{Int, Rational{Int}}) where {N<:Real}
function overapproximate(Z::Zonotope{N}, ::Type{<:Zonotope}, r::Union{Integer, Rational}) where {N<:Real}
c, G = Z.center, Z.generators
d, p = dim(Z), ngens(Z)

Expand Down
6 changes: 3 additions & 3 deletions src/Sets/Zonotope.jl
Expand Up @@ -257,7 +257,7 @@ function scale(α::Real, Z::Zonotope)
end

"""
reduce_order(Z::Zonotope, r::Union{Int, Rational{Int}})::Zonotope
reduce_order(Z::Zonotope, r::Union{Integer, Rational})::Zonotope
Reduce the order of a zonotope by overapproximating with a zonotope with less
generators.
Expand All @@ -273,9 +273,9 @@ A new zonotope with less generators, if possible.
### Algorithm
See `overapproximate(Z::Zonotope{N}, ::Type{<:Zonotope}, r::Union{Int, Rational{Int}}) where {N<:Real}` for details.
See `overapproximate(Z::Zonotope{N}, ::Type{<:Zonotope}, r::Union{Integer, Rational}) where {N<:Real}` for details.
"""
function reduce_order(Z::Zonotope{N}, r::Union{Int, Rational{Int}})::Zonotope{N} where {N<:Real}
function reduce_order(Z::Zonotope{N}, r::Union{Integer, Rational})::Zonotope{N} where {N<:Real}
return overapproximate(Z, Zonotope, r)
end

Expand Down

0 comments on commit da0be0d

Please sign in to comment.