Skip to content

Commit

Permalink
R Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrogoyski committed Aug 25, 2020
1 parent d8eb1ac commit 7ee80ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Statistics/Distance.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,14 @@ public static function minkowski(array $xs, array $ys, int $p): float
$∑|xᵢ − yᵢ⟯ᵖ = array_sum(
array_map(
function ($x, $y) use ($p) {
return abs($x - $y)**$p;
return abs($x - $y) ** $p;
},
$xs,
$ys
)
);

return $∑|xᵢ − yᵢ⟯ᵖ**(1/$p);
return $∑|xᵢ − yᵢ⟯ᵖ ** (1 / $p);
}

/**
Expand Down

0 comments on commit 7ee80ef

Please sign in to comment.