Set difference

LazySets.API.differenceMethod
difference(X::AbstractHyperrectangle, Y::AbstractHyperrectangle)

Compute the set difference between two hyperrectangular sets.

Input

  • X – first hyperrectangular set
  • Y – second hyperrectangular set

The set difference is defined as:

\[ X ∖ Y = \{x: x ∈ X \text{ and } x ∉ Y \}\]

Output

A UnionSetArray consisting of the union of hyperrectangles. Note that this union is in general not convex.

Algorithm

This implementation uses IntervalArithmetic.setdiff.

source