mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2025-04-07 02:31:51 +00:00
docs for manhattan distance
This commit is contained in:
parent
100205d767
commit
6f5f190600
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
Class for calculation Euclidean distance.
|
Class for calculation Euclidean distance.
|
||||||
|
|
||||||
### Euclidean
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To calculate distance:
|
To calculate distance:
|
||||||
|
@ -1 +1,16 @@
|
|||||||
# Manhattan
|
# Manhattan
|
||||||
|
|
||||||
|
Class for calculation Manhattan distance.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
To calculate distance:
|
||||||
|
|
||||||
|
```
|
||||||
|
$a = [4, 6];
|
||||||
|
$b = [2, 5];
|
||||||
|
|
||||||
|
$manhattan = new Manhattan();
|
||||||
|
$manhattan->distance($a, $b);
|
||||||
|
// return 3
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user