Tree-structured Partitioning Based on Splitting Histograms of Distances