Try using a binary search for minimum population size example
Distance calculation now in StatisticsComponent