Hausdorff distance
The Hausdorff distance on subsets of a metric (or emetric) space.
Given two subsets s
and t
of a metric space, their Hausdorff distance is the smallest d
such that any point s
is within d
of a point in t
, and conversely. This quantity
is often infinite (think of s
bounded and t
unbounded), and therefore better
expressed in the setting of emetric spaces.
Main definitions
This files introduces:
inf_edist x s
, the infimum edistance of a pointx
to a sets
in an emetric spaceHausdorff_edist s t
, the Hausdorff edistance of two sets in an emetric space- Versions of these notions on metric spaces, called respectively
inf_dist
andHausdorff_dist
.
The minimal edistance of a point to a set
Equations
- emetric.inf_edist x s = has_Inf.Inf (has_edist.edist x '' s)
The edist to a union is the minimum of the edists
The edist to a singleton is the edistance to the single point of this singleton
The edist to a set is bounded above by the edist to any of its points
If a point x
belongs to s
, then its edist to s
vanishes
The edist is monotonous with respect to inclusion
If the edist to a set is < r
, there exists a point in the set at edistance < r
The edist of x
to s
is bounded by the sum of the edist of y
to s
and
the edist from x
to y
The edist to a set depends continuously on the point
The edist to a set and to its closure coincide
A point belongs to the closure of s
iff its infimum edistance to this set vanishes
Given a closed set s
, a point belongs to s
iff its infimum edistance to this set vanishes
The infimum edistance is invariant under isometries
The Hausdorff edistance between two sets is the smallest r
such that each set
is contained in the r
-neighborhood of the other one
Equations
- emetric.Hausdorff_edist s t = has_Sup.Sup ((λ (x : α), emetric.inf_edist x t) '' s) ⊔ has_Sup.Sup ((λ (x : α), emetric.inf_edist x s) '' t)
The Hausdorff edistance of a set to itself vanishes
The Haudorff edistances of s
to t
and of t
to s
coincide
Bounding the Hausdorff edistance by bounding the edistance of any point in each set to the other set
Bounding the Hausdorff edistance by exhibiting, for any point in each set, another point in the other set at controlled distance
The distance to a set is controlled by the Hausdorff distance
If the Hausdorff distance is <r
, then any point in one of the sets has
a corresponding point at distance <r
in the other set
The distance from x
to s
or t
is controlled in terms of the Hausdorff distance
between s
and t
The Hausdorff edistance is invariant under eisometries
The Hausdorff distance is controlled by the diameter of the union
The Hausdorff distance satisfies the triangular inequality
The Hausdorff edistance between a set and its closure vanishes
Replacing a set by its closure does not change the Hausdorff edistance.
Replacing a set by its closure does not change the Hausdorff edistance.
The Hausdorff edistance between sets or their closures is the same
Two sets are at zero Hausdorff edistance if and only if they have the same closure
Two closed sets are at zero Hausdorff edistance if and only if they coincide
The Haudorff edistance to the empty set is infinite
If a set is at finite Hausdorff edistance of a nonempty set, it is nonempty
The minimal distance of a point to a set
Equations
- metric.inf_dist x s = (emetric.inf_edist x s).to_real
the minimal distance is always nonnegative
the minimal distance to the empty set is 0 (if you want to have the more reasonable
value ∞ instead, use inf_edist
, which takes values in ennreal)
In a metric space, the minimal edistance to a nonempty set is finite
The minimal distance of a point to a set containing it vanishes
The minimal distance to a singleton is the distance to the unique point in this singleton
The minimal distance to a set is bounded by the distance to any point in this set
The minimal distance is monotonous with respect to inclusion
If the minimal distance to a set is <r
, there exists a point in this set at distance <r
The minimal distance from x
to s
is bounded by the distance from y
to s
, modulo
the distance between x
and y
The minimal distance to a set is Lipschitz in point with constant 1
The minimal distance to a set is uniformly continuous in point
The minimal distance to a set is continuous in point
The minimal distance to a set and its closure coincide
A point belongs to the closure of s
iff its infimum distance to this set vanishes
Given a closed set s
, a point belongs to s
iff its infimum distance to this set vanishes
The infimum distance is invariant under isometries
The Hausdorff distance between two sets is the smallest nonnegative r
such that each set is
included in the r
-neighborhood of the other. If there is no such r
, it is defined to
be 0
, arbitrarily
Equations
- metric.Hausdorff_dist s t = (emetric.Hausdorff_edist s t).to_real
The Hausdorff distance is nonnegative
If two sets are nonempty and bounded in a metric space, they are at finite Hausdorff edistance
The Hausdorff distance between a set and itself is zero
The Hausdorff distance from s
to t
and from t
to s
coincide
The Hausdorff distance to the empty set vanishes (if you want to have the more reasonable
value ∞ instead, use Hausdorff_edist
, which takes values in ennreal)
The Hausdorff distance to the empty set vanishes (if you want to have the more reasonable
value ∞ instead, use Hausdorff_edist
, which takes values in ennreal)
Bounding the Hausdorff distance by bounding the distance of any point in each set to the other set
Bounding the Hausdorff distance by exhibiting, for any point in each set, another point in the other set at controlled distance
The Hausdorff distance is controlled by the diameter of the union
The distance to a set is controlled by the Hausdorff distance
If the Hausdorff distance is <r
, then any point in one of the sets is at distance
<r
of a point in the other set
If the Hausdorff distance is <r
, then any point in one of the sets is at distance
<r
of a point in the other set
The infimum distance to s
and t
are the same, up to the Hausdorff distance
between s
and t
The Hausdorff distance is invariant under isometries
The Hausdorff distance satisfies the triangular inequality
The Hausdorff distance satisfies the triangular inequality
The Hausdorff distance between a set and its closure vanish
Replacing a set by its closure does not change the Hausdorff distance.
Replacing a set by its closure does not change the Hausdorff distance.
The Hausdorff distance between two sets and their closures coincide
Two sets are at zero Hausdorff distance if and only if they have the same closures
Two closed sets are at zero Hausdorff distance if and only if they coincide