Class MarkovClustering<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 MarkovClustering<V,​E>
    extends Object
    implements org.jgrapht.alg.interfaces.ClusteringAlgorithm<V>
    Naïve implementation of the Markov Clustering (MCL) algorithm.

    This implementation assumes processing of relatively small graphs due to the lack of pruning optimizations.

    See Also:
    van Dongen (2000), van Dongen (2008)
    • Field Detail

      • graph

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

        protected final int e
        The expansion parameter.
      • r

        protected final double r
        The inflation parameter.
      • iterations

        protected final int iterations
        The maximal number of iterations.
      • clustering

        protected org.jgrapht.alg.interfaces.ClusteringAlgorithm.Clustering<V> clustering
        The cached clustering result.
    • Constructor Detail

      • MarkovClustering

        public MarkovClustering​(org.jgrapht.Graph<V,​E> graph,
                                int e,
                                double r,
                                int iterations)
        Create an instance of the Markov Clustering algorithm.
        Parameters:
        graph - the graph
        e - the expansion parameter
        r - the inflation parameter
        iterations - the maximal number of iterations
    • Method Detail

      • builder

        public static <V,​E> MarkovClustering.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>