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:
java.io.Serializable,java.lang.Iterable<java.util.Set<V>>,ClusteringAlgorithm.Clustering<V>
- Enclosing interface:
- ClusteringAlgorithm<V>
public static class ClusteringAlgorithm.ClusteringImpl<V> extends java.lang.Object implements ClusteringAlgorithm.Clustering<V>, java.io.Serializable
Default implementation of the clustering interface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClusteringImpl(java.util.List<java.util.Set<V>> clusters)Construct a new clustering.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.Set<V>>getClusters()Get the clusters.intgetNumberClusters()Get the number of clusters.java.util.Iterator<java.util.Set<V>>iterator()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ClusteringImpl
public ClusteringImpl(java.util.List<java.util.Set<V>> clusters)
Construct a new clustering.- Parameters:
clusters- clusters
-
-
Method Detail
-
getNumberClusters
public int getNumberClusters()
Description copied from interface:ClusteringAlgorithm.ClusteringGet the number of clusters.- Specified by:
getNumberClustersin interfaceClusteringAlgorithm.Clustering<V>- Returns:
- the number of clusters
-
getClusters
public java.util.List<java.util.Set<V>> getClusters()
Description copied from interface:ClusteringAlgorithm.ClusteringGet the clusters.- Specified by:
getClustersin interfaceClusteringAlgorithm.Clustering<V>- Returns:
- a list of clusters
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-