Class SingletonClustering<V,​E>

  • Type Parameters:
    V - the type of nodes in the graph
    E - the type of edges in the graph
    All Implemented Interfaces:
    org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>

    public class SingletonClustering<V,​E>
    extends Object
    implements org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>
    A trivial clustering algorithm that puts every node in a separate cluster.
    • Field Detail

      • graph

        protected final org.jgrapht.Graph<V,​E> graph
        The graph.
    • Constructor Detail

      • SingletonClustering

        public SingletonClustering​(org.jgrapht.Graph<V,​E> graph)
        Set up the trivial clustering algorithm that puts every node in a separate cluster.
        Parameters:
        graph - the graph
    • Method Detail

      • builder

        public static <V,​E> SingletonClustering.Builder<V,​E> builder()
        Create a builder.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Returns:
        a builder
      • getClustering

        public org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V> getClustering()
        Specified by:
        getClustering in interface org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>