php-ml/docs/machine-learning/metric/distance/manhattan.md
2016-04-15 22:32:20 +02:00

303 B

Manhattan

Class for calculation Manhattan distance.

manhattan

To calculate distance:

$a = [4, 6];
$b = [2, 5];
   
$manhattan = new Manhattan();
$manhattan->distance($a, $b);
// return 3