coordinates_of_points_in_subcollection
This is an auxiliery function. It take the coordinates of points, ids of subset of points, and number of coordinate, and return a sorted vector of the given coodrinate in the considered points.
For instance, given the collection of points:
1 2 3
4 5 6
7 8 9
and which_subset = 2,3
and number_of_coordinate = 2
the procedure below will return the vector [2,5,8].