Distance
ReachabilityBase.Arrays.distance
— Methoddistance(S::AbstractSingleton, X::LazySet; [p]::Real=2.0)
Compute the distance between the singleton S
and the set X
with respect to the given p
-norm.
Input
S
– singleton, i.e., a set with one elementX
– setp
– (optional, default:2.0
) thep
-norm used;p = 2.0
corresponds to the usual Euclidean norm
Output
A scalar representing the distance between the element wrapped by S
and the set X
.
ReachabilityBase.Arrays.distance
— Methoddistance(H1::AbstractHyperrectangle, H2::AbstractHyperrectangle;
[p]::Real=2)
Compute the standard distance between two hyperrectangular sets, defined as
\[ \inf_{x ∈ H_1, y ∈ H_2} \{ d(x, y) \}.\]
Input
H1
– hyperrectangular setH2
– hyperrectangular setp
– (optional; default:2
) value of the $p$-norm
Output
The distance, which is zero if the sets intersect and otherwise the $p$-norm of the shortest line segment between any pair of points.