new.cluster.map | R Documentation |
Constructor for an object supporting simple connected-component-clustering
new.cluster.map(n)
n |
The number of elements to cluster. |
The process starts with n objects, each in their own cluster. Whenever a link is between two objects is reported, their clusters are merged. Contains the following functions:
addLink(i,j)
: Creates a new link between items i and j. Whenever a link
is created, the clusters encompassing the two objects are merged.
getClusters()
: Returns a list of lists representing the clusters
getIdxOf(i)
: Returns the cluster index of a given object.
the mapper object
cmap <- new.cluster.map(10)
cmap$addLink(1,5)
cmap$addLink(3,5)
cmap$addLink(1,5)
cmap$getClusters()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.