C++ code for generating minimal spanning trees quickly via k-d tree neighbor searching.