C code for memory efficient fixed distance agglomerative clustering in 3 dimensions