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.int
getNumberClusters()
Get the number of clusters.java.util.Iterator<java.util.Set<V>>
iterator()
java.lang.String
toString()
-
-
-
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.Clustering
Get the number of clusters.- Specified by:
getNumberClusters
in interfaceClusteringAlgorithm.Clustering<V>
- Returns:
- the number of clusters
-
getClusters
public java.util.List<java.util.Set<V>> getClusters()
Description copied from interface:ClusteringAlgorithm.Clustering
Get the clusters.- Specified by:
getClusters
in interfaceClusteringAlgorithm.Clustering<V>
- Returns:
- a list of clusters
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-