diff --git a/src/Approximations/overapproximate.jl b/src/Approximations/overapproximate.jl index bde436f149..81c3ae2074 100644 --- a/src/Approximations/overapproximate.jl +++ b/src/Approximations/overapproximate.jl @@ -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. @@ -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) diff --git a/src/Sets/Zonotope.jl b/src/Sets/Zonotope.jl index 0d912d2dfb..7e7c60a035 100644 --- a/src/Sets/Zonotope.jl +++ b/src/Sets/Zonotope.jl @@ -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. @@ -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