I have two disjoint sets "X, Y" of points where there is no other assumption about both sets, only$X$ and $Y$, which are finite and disjoint.
It is needed I want to compute the distance between those sets "X, Y" using the formulathem defined by:
$$d(X,Y)= \frac{\sum_{x \in X} ||x-y|| + \sum_{y \in Y} ||y-x||}{|x|+|y|} $$
$$d(X,Y)= \frac{\sum_{x \in X} ||x-Y|| + \sum_{y \in Y} ||y-X||}{|x|+|y|} $$ where $||x-y||$$||x-Y||$ represents the distance between the point $x$ in $X$ to its closest point $y$ in $Y$, and |x|$|x|$, |y|$|y|$ are the cardinalitycardinalities of sets |X|, |Y|$X$ and $Y$ respectively.
Considering thatSince both sets are large with a huge number of points, then using the above formula is computationally expensive knowing that I am looking to implement it and to do simulations.
How can I would like to know if there is a known method or an idea to calculate, for each element $x$ in $X$, the first nearest neighbor $y$ in $Y$ in order to bound first mathematically the distance between both sets before doing my simulations.
If needed, I would be very grateful to clarify more any ambiguity in my first question. it or approximate it efficiently?