Skip to content

Instantly share code, notes, and snippets.

@JiteshPshah
Last active February 17, 2018 15:16
Show Gist options
  • Save JiteshPshah/e62da295e014baad9f6de3c2dde786b9 to your computer and use it in GitHub Desktop.
Save JiteshPshah/e62da295e014baad9f6de3c2dde786b9 to your computer and use it in GitHub Desktop.
ρ(point,centroid) = |x2 – x1| + |y2 – y1|
ρ((1,5), (4,2)) = |x2 – x1| + |y2 – y1|
= |1 – 4| + |5 – 2|
= 3 + 3
= 6
ρ((1,5), (2,9)) = |x2 – x1| + |y2 – y1|
= |1 – 2| + |5 – 9|
= 1 + 4
= 5
ρ((1,5), (6,9)) = |x2 – x1| + |y2 – y1|
= |1 – 6| + |5 – 9|
= 5 + 4
= 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment