I have two disjoint sets "X, Y" of points where there is no other assumption about both sets, only disjoint.
It is needed to compute the distance between those sets "X, Y" using the formula:
$$d(X,Y)= \frac{\sum_{x \in X} ||x-y|| + \sum_{y \in Y} ||y-x||}{|x|+|y|} $$ where $||x-y||$ represents the distance between the point $x$ in $X$ to its closest point $y$ in $Y$, and |x|, |y| are the cardinality of sets |X|, |Y| respectively.
Considering that 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.
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.