DistanceMatrix create common api