Class MarkovClusteringOfficial<V,​E>

  • Type Parameters:
    V - the type of nodes in the graph
    E - the type of edges in the graph
    All Implemented Interfaces:
    Clustering<V>

    public class MarkovClusteringOfficial<V,​E>
    extends Object
    implements Clustering<V>
    A wrapper for the official implementation of the Markov Clustering (MCL) algorithm in C.

    This is a weird thing. The official implementation of MCL is very fast, but is distributed under GPL. In order to use it we need to run the separate process and speak to it over standard input/output redirection.

    See Also:
    van Dongen (2000)
    • Constructor Detail

      • MarkovClusteringOfficial

        public MarkovClusteringOfficial​(org.jgrapht.Graph<V,​E> graph,
                                        Path mcl,
                                        double r,
                                        int threads)
        Create an instance of the Markov Clustering algorithm wrapper.
        Parameters:
        graph - the graph
        mcl - the path to the MCL binary
        r - the inflation parameter
        threads - the number of threads
      • MarkovClusteringOfficial

        public MarkovClusteringOfficial​(org.jgrapht.Graph<V,​E> graph,
                                        Path mcl,
                                        double r)
        Create an instance of the Markov Clustering algorithm wrapper.
        Parameters:
        graph - the graph
        mcl - the path to the MCL binary
        r - the inflation parameter
    • Method Detail

      • provider

        public static <V,​E> Function<org.jgrapht.Graph<V,​E>,​Clustering<V>> provider​(Path mcl,
                                                                                                      double r,
                                                                                                      int threads)
        A factory function that sets up the algorithm for the given graph.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Parameters:
        mcl - the path to the MCL binary
        r - the inflation parameter
        threads - the number of threads
        Returns:
        a factory function that sets up the algorithm for the given graph
      • provider

        public static <V,​E> Function<org.jgrapht.Graph<V,​E>,​Clustering<V>> provider​(Path mcl,
                                                                                                      double r)
        A factory function that sets up the algorithm for the given graph.
        Type Parameters:
        V - the type of nodes in the graph
        E - the type of edges in the graph
        Parameters:
        mcl - the path to the MCL binary
        r - the inflation parameter
        Returns:
        a factory function that sets up the algorithm for the given graph
      • fit

        public void fit()
        Description copied from interface: Clustering
        Run the algorithm to induce the parameters of the clusters.
        Specified by:
        fit in interface Clustering<V>