[API] MinimumDistance implementation moved to cpp