Package org.nlpub.watset.graph
Class ComponentsClustering<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.ComponentsClustering<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
Clustering<V>
public class ComponentsClustering<V,E> extends Object implements Clustering<V>
A trivial clustering algorithm that treats every connected component as a cluster.
-
-
Constructor Summary
Constructors Constructor Description ComponentsClustering(org.jgrapht.Graph<V,E> graph)Set up the trivial clustering algorithm that treats every connected component as a cluster.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfit()Run the algorithm to induce the parameters of the clusters.Collection<Collection<V>>getClusters()Return a collection of clusters, each cluster is a collection of objects.
-
-
-
Method Detail
-
fit
public void fit()
Description copied from interface:ClusteringRun the algorithm to induce the parameters of the clusters.- Specified by:
fitin interfaceClustering<V>
-
getClusters
public Collection<Collection<V>> getClusters()
Description copied from interface:ClusteringReturn a collection of clusters, each cluster is a collection of objects. Usually this method is called after theClustering.fit()method.- Specified by:
getClustersin interfaceClustering<V>- Returns:
- clusters
-
-