public function compute(array $a, array $b) : float
    {
        $distance = 0.;

        foreach ($a as $i => $value) {
            $distance += abs($value - $b[$i]) ** $this->lambda;
        }

        return $distance ** $this->inverse;
    }
public function compute(array $a, array $b) : float
    {
        $distance = 0.;

        foreach ($a as $i => $value) {
            $distance += abs($value - $b[$i]) ** $this->lambda;
        }

        return $distance ** $this->inverse;
    }
public function compute ( array $ a , array $ b ) : float { $ distance = 0. ; foreach ( $ a as $ i => $ value ) { $ distance += abs ( $ value - $ b [ $ i ] ) ** $ this -> lambda ; } return $ distance ** $ this -> inverse ; }
Compute the distance given two vectors.

@param array $a
@param array $b
@return float
Compute the distance given two vectors .