From cec450669ec0b49ba67c4a62d8dea19289afdbdd Mon Sep 17 00:00:00 2001 From: schillic Date: Sat, 15 Jun 2019 17:30:14 +0200 Subject: [PATCH] add docs for AbstractZonotope --- docs/src/lib/interfaces.md | 21 +++++++++++++++++++++ docs/src/lib/operations.md | 5 +++++ docs/src/lib/representations.md | 31 +++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/docs/src/lib/interfaces.md b/docs/src/lib/interfaces.md index 64155c7b0d..5b3bf14d87 100644 --- a/docs/src/lib/interfaces.md +++ b/docs/src/lib/interfaces.md @@ -206,6 +206,23 @@ an_element(::AbstractCentrallySymmetricPolytope{N}) where {N<:Real} isempty(::AbstractCentrallySymmetricPolytope) ``` +##### AbstractZonotope + +A zonotope is a specific centrally symmetric polytope characterized by a +center and a collection of generators. + +```@docs +AbstractZonotope +``` + +This interface defines the following functions: + +```@docs +ngens(Z::AbstractZonotope) +genmat_fallback(Z::AbstractZonotope{N}) where {N<:Real} +generators_fallback(Z::AbstractZonotope{N}) where {N<:Real} +``` + ##### Hyperrectangle A hyperrectangle is a special centrally symmetric polytope with axis-aligned @@ -229,6 +246,8 @@ high(::AbstractHyperrectangle{N}, ::Int) where {N<:Real} low(::AbstractHyperrectangle{N}) where {N<:Real} low(::AbstractHyperrectangle{N}, ::Int) where {N<:Real} split(::AbstractHyperrectangle{N}, ::AbstractVector{Int}) where {N<:Real} +generators(::AbstractHyperrectangle) +genmat(::AbstractHyperrectangle) ``` ##### Singleton @@ -254,6 +273,8 @@ high(::AbstractSingleton{N}, ::Int) where {N<:Real} low(::AbstractSingleton{N}) where {N<:Real} low(::AbstractSingleton{N}, ::Int) where {N<:Real} linear_map(::AbstractMatrix{N}, ::AbstractSingleton{N}) where {N<:Real} +generators(::AbstractSingleton{N}) where {N<:Real} +genmat(::AbstractSingleton{N}) where {N<:Real} plot_recipe(::AbstractSingleton{N}, ::N=zero(N)) where {N<:Real} RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::AbstractSingleton{N}, ::N=zero(N)) where {N<:Real} ``` diff --git a/docs/src/lib/operations.md b/docs/src/lib/operations.md index 0850b308c6..330621a188 100644 --- a/docs/src/lib/operations.md +++ b/docs/src/lib/operations.md @@ -328,6 +328,9 @@ Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) * [`an_element`](@ref an_element(::AbstractCentrallySymmetricPolytope{N}) where {N<:Real}) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + Inherited from [`AbstractHyperrectangle`](@ref): * [`∈`](@ref ∈(::AbstractVector{N}, ::AbstractHyperrectangle{N}) where {N<:Real}) * [`norm`](@ref norm(::AbstractHyperrectangle, ::Real)) @@ -335,6 +338,8 @@ Inherited from [`AbstractHyperrectangle`](@ref): * [`vertices_list`](@ref vertices_list(::AbstractHyperrectangle{N}) where {N<:Real}) * [`high`](@ref high(::AbstractHyperrectangle{N}) where {N<:Real}) * [`low`](@ref low(::AbstractHyperrectangle{N}) where {N<:Real}) +* [`generators`](@ref generators(::AbstractZonotope)) +* [`genmat`](@ref genmat(::AbstractZonotope)) ### Translation diff --git a/docs/src/lib/representations.md b/docs/src/lib/representations.md index 514505a85a..2ddc5ce2a9 100644 --- a/docs/src/lib/representations.md +++ b/docs/src/lib/representations.md @@ -61,6 +61,9 @@ Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) * [`an_element`](@ref an_element(::AbstractCentrallySymmetricPolytope{N}) where {N<:Real}) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + Inherited from [`AbstractHyperrectangle`](@ref): * [`σ`](@ref σ(::AbstractVector{N}, ::AbstractHyperrectangle{N}) where {N<:Real}) * [`∈`](@ref ∈(::AbstractVector{N}, ::AbstractHyperrectangle{N}) where {N<:Real}) @@ -68,6 +71,8 @@ Inherited from [`AbstractHyperrectangle`](@ref): * [`vertices_list`](@ref vertices_list(::AbstractHyperrectangle{N}) where {N<:Real}) * [`high`](@ref high(::AbstractHyperrectangle{N}) where {N<:Real}) * [`low`](@ref low(::AbstractHyperrectangle{N}) where {N<:Real}) +* [`generators`](@ref generators(::AbstractZonotope)) +* [`genmat`](@ref genmat(::AbstractZonotope)) ### Manhattan norm ball @@ -235,6 +240,9 @@ Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) * [`an_element`](@ref an_element(::AbstractCentrallySymmetricPolytope{N}) where {N<:Real}) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + Inherited from [`AbstractHyperrectangle`](@ref): * [`σ`](@ref σ(::AbstractVector{N}, ::AbstractHyperrectangle{N}) where {N<:Real}) * [`∈`](@ref ∈(::AbstractVector{N}, ::AbstractHyperrectangle{N}) where {N<:Real}) @@ -243,6 +251,8 @@ Inherited from [`AbstractHyperrectangle`](@ref): * [`vertices_list`](@ref vertices_list(::AbstractHyperrectangle{N}) where {N<:Real}) * [`high`](@ref high(::AbstractHyperrectangle{N}) where {N<:Real}) * [`low`](@ref low(::AbstractHyperrectangle{N}) where {N<:Real}) +* [`generators`](@ref generators(::AbstractZonotope)) +* [`genmat`](@ref genmat(::AbstractZonotope)) ## Interval @@ -279,9 +289,14 @@ Inherited from [`AbstractPolytope`](@ref): Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + Inherited from [`AbstractHyperrectangle`](@ref): * [`norm`](@ref norm(::AbstractHyperrectangle, ::Real)) * [`radius`](@ref radius(::AbstractHyperrectangle, ::Real)) +* [`generators`](@ref generators(::AbstractZonotope)) +* [`genmat`](@ref genmat(::AbstractZonotope)) ## Line @@ -318,6 +333,8 @@ halfspace_right(::LineSegment) vertices_list(::LineSegment{N}) where {N<:Real} constraints_list(::LineSegment{N}) where {N<:Real} translate(::LineSegment{N}, ::AbstractVector{N}) where {N<:Real} +generators(::LineSegment{N}) where {N<:Real} +genmat(::LineSegment) plot_recipe(::LineSegment{N}, ::N=zero(N)) where {N<:Real} RecipesBase.apply_recipe(::Dict{Symbol,Any}, ::Union{LineSegment{N}, Interval{N}}, ::N=zero(N)) where {N<:Real} ``` @@ -332,6 +349,9 @@ Inherited from [`AbstractPolytope`](@ref): Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + ## Polygons ### Constraint representation @@ -566,6 +586,9 @@ Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`dim`](@ref dim(::AbstractCentrallySymmetricPolytope)) * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + Inherited from [`AbstractHyperrectangle`](@ref): * [`norm`](@ref norm(::AbstractHyperrectangle, ::Real)) * [`radius`](@ref radius(::AbstractHyperrectangle, ::Real)) @@ -581,6 +604,8 @@ Inherited from [`AbstractSingleton`](@ref): * [`radius_hyperrectangle`](@ref radius_hyperrectangle(::AbstractSingleton{N}) where {N<:Real}) * [`radius_hyperrectangle`](@ref radius_hyperrectangle(::AbstractSingleton{N}, ::Int) where {N<:Real}) * [`linear_map`](@ref linear_map(::AbstractMatrix{N}, ::AbstractSingleton{N}) where {N<:Real}) +* [`generators`](@ref generators(::AbstractSingleton{N}) where {N<:Real}) +* [`genmat`](@ref genmat(::AbstractSingleton{N}) where {N<:Real}) ## Universe @@ -625,6 +650,9 @@ Inherited from [`AbstractPolytope`](@ref): Inherited from [`AbstractCentrallySymmetricPolytope`](@ref): * [`isempty`](@ref isempty(::AbstractCentrallySymmetricPolytope)) +Inherited from [`AbstractZonotope`](@ref): +* [`ngens`](@ref ngens(::AbstractZonotope)) + Inherited from [`AbstractHyperrectangle`](@ref): * [`norm`](@ref norm(::AbstractHyperrectangle, ::Real)) * [`radius`](@ref radius(::AbstractHyperrectangle, ::Real)) @@ -637,6 +665,8 @@ Inherited from [`AbstractSingleton`](@ref): * [`vertices_list`](@ref vertices_list(::AbstractSingleton{N}) where {N<:Real}) * [`center`](@ref center(::AbstractSingleton{N}) where {N<:Real}) * [`an_element`](@ref an_element(::AbstractSingleton{N}) where {N<:Real}) +* [`generators`](@ref generators(::AbstractSingleton{N}) where {N<:Real}) +* [`genmat`](@ref genmat(::AbstractSingleton{N}) where {N<:Real}) ## Zonotope @@ -652,6 +682,7 @@ constraints_list(::Zonotope{N}) where {N<:AbstractFloat} center(::Zonotope{N}) where {N<:Real} order(::Zonotope) generators(Z::Zonotope) +genmat(Z::Zonotope) minkowski_sum(::Zonotope{N}, ::Zonotope{N}) where {N<:Real} linear_map(::AbstractMatrix{N}, ::Zonotope{N}) where {N<:Real} translate(::Zonotope{N}, ::AbstractVector{N}) where {N<:Real}