distance() public method

public distance ( array $a, array $b ) : float
$a array
$b array
return float
Example #1
0
 public function testCalculateDistanceForThreeDimensions()
 {
     $a = [6, 10, 3];
     $b = [2, 5, 5];
     $expectedDistance = 11;
     $actualDistance = $this->distanceMetric->distance($a, $b);
     $this->assertEquals($expectedDistance, $actualDistance);
 }