Last active
August 29, 2015 14:02
-
-
Save davetapley/fee680610f058fcfc579 to your computer and use it in GitHub Desktop.
Clustering
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start with a list of clusters: | |
a, b, x, c, x, x, d, e, f, g, x, h | |
Select out clusters to try and find a place for: | |
a, b, c, d, e, f, g, h | |
Map over a method to (optionally) assign a place (pN) to each cluster: | |
(this is done with a DelegateClass containing the place or nil) | |
a(p1), b(p2), c(nil), d(p1), e(p1), f(nil), g(p1), h(p1) | |
Merge together clusters with the same place, who were originally adjacent: | |
a(p1), b(p2), c(nil), de(p1), f(nil), g(p1), h(p1) | |
d and e are merged, because they're at the same place; | |
g and h aren't, because there was originally an x cluster between them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment