LazySets.jl icon indicating copy to clipboard operation
LazySets.jl copied to clipboard

Extended functionality for existing set types

Open schillic opened this issue 3 years ago • 0 comments

This issue collects open tasks for set types that occurred while revisiting them in the course of #3047. This includes:

  • implementing a more efficient method to improve a less efficient fallback method
  • implementing a new method that is currently missing
  • improving an existing implementation

Ball1

  • constructor with default center = origin (as for Ellipsoid)
  • area
  • volume
  • radius(B, Inf) = B.radius (for other p there should be a default method to call)
  • chebyshev_center_radius
  • constraints_list: fix case for radius 0 and avoid allocations with Iterators.product

Ball2

  • constructor with default center = origin (as for Ellipsoid)
  • radius(B, Inf) = B.radius (for other p there should be a default method to call)
  • distance

BallInf

  • constructor with default center = origin (as for Ellipsoid)
  • chebyshev_center_radius

Ballp

  • constructor with default center = origin (as for Ellipsoid)
  • area
  • volume formula
  • chebyshev_center_radius (for p > 2 it is just the same radius; for p < 2 there is a calculation with the norm of [1, …, 1])
  • radius(B, Inf) = B.radius (for other p there should be a default method to call)

DensePolynomialZonotope

  • minkowski_sum (Eq. (14) in [1])
  • quadratic_map of a Zonotope (Theorem 1 in [1])
  • overapproximate with a QuadraticMap (Corollary 1 in [1])
  • reduce_order (Proposition 2 in [1])

[1] Reachability analysis of nonlinear systems using conservative polynomialization and non-convex sets

Ellipsoid

  • area
  • volume
  • chebyshev_center_radius
  • low/high
  • distance

HParallelotope

  • order (= return 1//1)
  • generators
  • σ
  • ρ
  • low/high
  • center (could be more efficient to take the midpoint of low and high)
  • (checking each constraint directly should be more efficient)
  • vertices_list
  • translate

Hyperplane

  • _linear_map_hrep_helper
  • _σ_hyperplane_halfspace with Val arguments

Hyperrectangle

  • translate!

Line

  • isuniversal (witness case)

Line2D

  • ρ (reuse from Hyperplane, which gives Inf results instead of errors, also for other default implementations like low/high)
  • normalize
  • distance
  • reflect(x, L) = _reflect_point_hyperplane(x, L.a, L.b)

LineSegment

  • high
  • low
  • norm
  • radius
  • diameter
  • chebyshev_center_radius
  • rectify

RotatedHyperrectangle

  • generators
  • rand
  • (same as LinearMap, share the method)
  • low/high

VPolygon

  • low/high/extrema with dimension argument

VPolytope

  • low/high/extrema with dimension argument
  • an_element (see VPolygon)

ZeroSet

  • low/high/extrema with dimension argument

Zonotope

  • split! (instead of passing two similar matrices and using copyto!, create a copy directly in split!; but this is a public function)
  • generalized 2D vertices list (see FIXME)

Bloating

  • vertices_list (see constraints_list)
  • (see constraints_list or use distance)
  • isuniversal
  • translate

Intersection

  • ρ_helper: revisit whether isempty is reasonable (because it is expensive the first time)

all lazy operations

  • is_polyhedral (see also #3158)

AbstractSingleton

  • extrema (2x)
  • order
  • radius
  • norm
  • ρ(d::SingleEntryVector, H) (generalize existing methods for H::Hyperrectangle and H::BallInf)

AbstractHyperrectangle

  • vertices

box_approximation

  • box_approximation(::MinkowskiSum): use extrema and add the centers and radii
  • turn specific methods into extrema methods for the set types instead
    • afterward let box_approximation(::ConvexHull) only use the "extrema" algorithm (and remove the algorithm argument)

isdisjoint

  • Hyperplane/Hyperplane method: faster algorithm:
    • compare normal vectors (parallel or not); if equivalent, compare the offsets; otherwise they intersect

schillic avatar Aug 21 '22 16:08 schillic