is created for each point (25 paths, N=1 for each) which is feed into [Pull Point] for the pull geometry [G].
Correspondingly for the 4 source points a branch is created for each point and duplicated 25 times (4 paths, N=25 for each). This tree then needs to be inverted with [Path Mapper] so the structure will correspond to the format of the pull geometry. The mapping {A;B;C}(i) > {i}(B) produces (25 paths, N=4 for each) the structure to feed into the search point [P].
The [Pull Point] boolean toggle [C] needs to get set to False to obtain all the distances between all search and pull points (4 x 25 = 100 values).
Simultaneously there is also an index being created to correspond to the list of the 4 source points. This index is the integers 0 to 3 which are branched and inverted similar to the source points (25 paths, N=4 for each).
The distance output [D] from [Pull Point] is then sorted synchronously with the source point index for each branch. From the following screengrab branch {0;0} corresponds to a point in the 5 x 5 grid and the shortest distance between that point and a referenced source point index is 5.261. The index of the referenced source point is 3.
For each following sorted branch the first sorted index value will correspond to the closest source point (first [List Item] shown). This index value is then used to select from the original list of duplicated and inverted points and this is done for each of the 25 branches (second List Item shown).
Draw a line or whatever an away we go!…