Skip to content

Commit

Permalink
ConvexSet: make 'σ' a required method
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Dec 31, 2024
1 parent 4850de5 commit 265a7eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/src/lib/interfaces/ConvexSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Every convex set in this library implements this interface.
ConvexSet
```

This interface requires to implement the following function:

```@meta
CurrentModule = LazySets.API
```
```@docs; canonical=false
σ(::AbstractVector, ::LazySet)
```
```@meta
CurrentModule = LazySets
```

This interface defines the following functions (undocumented):

```@meta
Expand Down
6 changes: 6 additions & 0 deletions src/Interfaces/ConvexSet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export ConvexSet
Abstract type for convex sets, i.e., sets characterized by a (possibly infinite)
intersection of halfspaces, or equivalently, sets ``S`` such that for any two
elements ``x, y ∈ S`` and ``0 ≤ λ ≤ 1`` it holds that ``λ·x + (1-λ)·y ∈ S``.
### Notes
Every concrete `ConvexSet` must define the following function:
- `σ(::AbstractVector, ::LazySet)` -- return a support vector in the given direction
"""
abstract type ConvexSet{N} <: LazySet{N} end

Expand Down

0 comments on commit 265a7eb

Please sign in to comment.