Class Wcc


  • public class Wcc
    extends org.neo4j.gds.Algorithm<org.neo4j.gds.core.utils.paged.dss.DisjointSetStruct>
    Parallel Union-Find Algorithm based on the "Wait-free Parallel Algorithms for the Union-Find Problem" paper.
    See Also:
    HugeAtomicDisjointSetStruct, the paper

    For undirected graphs and directed graphs with index, we use a sampling based approach, as introduced in [1].

    The idea is to identify the largest component using a sampled subgraph. Relationships of nodes that are already contained in the largest component are not iterated. The compression step described in [1], is contained in DisjointSetStruct#setIdOf.

    [1] Michael Sutton, Tal Ben-Nun, and Amnon Barak. "Optimizing Parallel Graph Connectivity Computation via Subgraph Sampling" Symposium on Parallel and Distributed Processing, IPDPS 2018.

    • Field Summary

      • Fields inherited from class org.neo4j.gds.Algorithm

        progressTracker, terminationFlag
    • Constructor Summary

      Constructors 
      Constructor Description
      Wcc​(org.neo4j.gds.api.Graph graph, java.util.concurrent.ExecutorService executor, int minBatchSize, WccBaseConfig config, org.neo4j.gds.core.utils.progress.tasks.ProgressTracker progressTracker)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.neo4j.gds.core.utils.paged.dss.DisjointSetStruct compute()  
      static org.neo4j.gds.core.utils.mem.MemoryEstimation memoryEstimation​(boolean incremental)  
      void release()  
      • Methods inherited from class org.neo4j.gds.Algorithm

        getProgressTracker, getTerminationFlag, setTerminationFlag
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Wcc

        public Wcc​(org.neo4j.gds.api.Graph graph,
                   java.util.concurrent.ExecutorService executor,
                   int minBatchSize,
                   WccBaseConfig config,
                   org.neo4j.gds.core.utils.progress.tasks.ProgressTracker progressTracker)
    • Method Detail

      • memoryEstimation

        public static org.neo4j.gds.core.utils.mem.MemoryEstimation memoryEstimation​(boolean incremental)
      • compute

        public org.neo4j.gds.core.utils.paged.dss.DisjointSetStruct compute()
        Specified by:
        compute in class org.neo4j.gds.Algorithm<org.neo4j.gds.core.utils.paged.dss.DisjointSetStruct>
      • release

        public void release()
        Specified by:
        release in class org.neo4j.gds.Algorithm<org.neo4j.gds.core.utils.paged.dss.DisjointSetStruct>