A C implementation of "Efficient K-Nearest Neighbor Graph Construction for Generic Similarity Measures"