Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove scalar 'linear_map'
Browse files Browse the repository at this point in the history
schillic committed Jan 4, 2025
1 parent 2415f9e commit c140d61
Showing 3 changed files with 69 additions and 12 deletions.
70 changes: 69 additions & 1 deletion docs/src/lib/interfaces/LazySet.md
Original file line number Diff line number Diff line change
@@ -413,7 +413,6 @@ CurrentModule = LazySets
```
```@docs
linear_map(::AbstractMatrix, ::LazySet; kwargs...)
linear_map(::Number, ::LazySet; kwargs...)
project(::LazySet, ::AbstractVector{Int}, ::Nothing=nothing, ::Int=dim(X))
project(::LazySet, ::AbstractVector{Int}, ::Type{<:LazySet}, ::Int=dim(X))
project(::LazySet, ::AbstractVector{Int}, ::Pair{<:UnionAll,<:Real}, ::Int=dim(X))
@@ -570,6 +569,75 @@ plot3d
plot3d!
```

## Globally defined set functions

```@docs
○(c, a)
isconvextype(::Type{<:LazySet})
low(::LazySet)
high(::LazySet)
extrema(::LazySet, ::Int)
extrema(::LazySet)
convex_hull(::LazySet; kwargs...)
triangulate(::LazySet)
isboundedtype(::Type{<:LazySet})
isbounded(::LazySet)
_isbounded_unit_dimensions(::LazySet)
ispolyhedral(::LazySet)
isfeasible
norm(::LazySet, ::Real=Inf)
radius(::LazySet, ::Real=Inf)
diameter(::LazySet, ::Real=Inf)
isempty(::LazySet, ::Bool=false)
linear_map(::AbstractMatrix, ::LazySet; kwargs...)
affine_map(::Any, ::LazySet, ::AbstractVector)
exponential_map(::AbstractMatrix, ::LazySet)
an_element(::LazySet)
tosimplehrep(::LazySet)
reflect(::LazySet)
is_interior_point(::AbstractVector{<:Real}, ::LazySet; kwargs...)
isoperation(::LazySet)
isequivalent(::LazySet, ::LazySet)
surface(::LazySet)
area(::LazySet)
concretize(::LazySet)
complement(::LazySet)
polyhedron(::LazySet)
project(::LazySet, ::AbstractVector{Int}, ::Nothing=nothing, ::Int=dim(X))
project(::LazySet, ::AbstractVector{Int}, ::Type{<:LazySet}, ::Int=dim(X))
project(::LazySet, ::AbstractVector{Int}, ::Pair{<:UnionAll,<:Real}, ::Int=dim(X))
project(::LazySet, ::AbstractVector{Int}, ::Real, ::Int=dim(X))
rectify(::LazySet, ::Bool=false)
permute
rationalize(::Type{T}, ::LazySet{<:AbstractFloat}, ::Real) where {T<:Integer}
singleton_list(::LazySet)
constraints(::LazySet)
vertices(::LazySet)
delaunay
chebyshev_center_radius(::LazySet)
scale(::Real, ::LazySet)
translate(::LazySet, ::AbstractVector)
plot_recipe(::LazySet, ::Any)
```

## Support function and support vector

Every `LazySet` type must define a function `σ` to compute the support vector.
The support function, `ρ`, can optionally be defined; otherwise, a fallback
definition based on `σ` is used.

```@docs
σ
ρ(::AbstractVector, ::LazySet)
```

## Set functions that override Base functions

```@docs
==(::LazySet, ::LazySet)
≈(::LazySet, ::LazySet)
```

## Aliases for set types

```@docs
9 changes: 0 additions & 9 deletions src/Interfaces/LazySet.jl
Original file line number Diff line number Diff line change
@@ -1564,15 +1564,6 @@ function linear_map(M::AbstractMatrix, P::LazySet; kwargs...)
end
end

"""
linear_map(a::Number, X::LazySet; kwargs...)
Alias for `scale(a, X; kwargs...)`.
"""
function linear_map(a::Number, X::LazySet; kwargs...)
return scale(a, X; kwargs...)
end

"""
# Extended help
2 changes: 0 additions & 2 deletions test/Sets/Interval.jl
Original file line number Diff line number Diff line change
@@ -48,8 +48,6 @@ for N in [Float64, Float32, Rational{Int}]

# concrete linear map
@test linear_map(hcat(N(2)...), x) == Interval(N(2) * x.dat)
# alias for scale
@test linear_map(N(2), x) == Interval(N(2) * x.dat)

# concrete linear map with zonotope output
M2 = hcat(N[1, 2, 3])

0 comments on commit c140d61

Please sign in to comment.