Package org.jgrapht.alg.interfaces
Class ClusteringAlgorithm.ClusteringImpl<V>
- java.lang.Object
-
- org.jgrapht.alg.interfaces.ClusteringAlgorithm.ClusteringImpl<V>
-
- Type Parameters:
V
- the graph vertex type
- All Implemented Interfaces:
Serializable
,Iterable<Set<V>>
,ClusteringAlgorithm.Clustering<V>
- Enclosing interface:
- ClusteringAlgorithm<V>
public static class ClusteringAlgorithm.ClusteringImpl<V> extends Object implements ClusteringAlgorithm.Clustering<V>, Serializable
Default implementation of the clustering interface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClusteringImpl(List<Set<V>> clusters)
Construct a new clustering.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Set<V>>
getClusters()
Get the clusters.int
getNumberClusters()
Get the number of clusters.Iterator<Set<V>>
iterator()
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
getNumberClusters
public int getNumberClusters()
Description copied from interface:ClusteringAlgorithm.Clustering
Get the number of clusters.- Specified by:
getNumberClusters
in interfaceClusteringAlgorithm.Clustering<V>
- Returns:
- the number of clusters
-
getClusters
public List<Set<V>> getClusters()
Description copied from interface:ClusteringAlgorithm.Clustering
Get the clusters.- Specified by:
getClusters
in interfaceClusteringAlgorithm.Clustering<V>
- Returns:
- a list of clusters
-
-