Class PartitionUtils
java.lang.Object
org.neo4j.gds.core.utils.partition.PartitionUtils
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <TASK> Iterator<TASK>
blockAlignedPartitioning
(org.neo4j.gds.collections.ha.HugeLongArray sortedIds, int blockShift, Function<Partition, TASK> taskCreator) static <TASK> List<TASK>
customDegreePartitionWithBatchSize
(Graph graph, int concurrency, LongToIntFunction customDegreeFunction, Function<DegreePartition, TASK> taskCreator, Optional<Integer> minBatchSize, Optional<Long> weightSum) static <TASK> List<TASK>
degreePartition
(long nodeCount, long relationshipCount, PartitionUtils.DegreeFunction degrees, int concurrency, Function<DegreePartition, TASK> taskCreator, Optional<Integer> minBatchSize) static <TASK> List<TASK>
degreePartition
(Graph graph, int concurrency, Function<DegreePartition, TASK> taskCreator, Optional<Integer> minBatchSize) static Stream<DegreePartition>
degreePartitionStream
(long nodeCount, long relationshipCount, int concurrency, PartitionUtils.DegreeFunction degrees) Returns a lazy stream of many small partitions (in contrast to list of few big ones)static <TASK> List<TASK>
degreePartitionWithBatchSize
(long nodeCount, PartitionUtils.DegreeFunction degrees, long batchSize, Function<DegreePartition, TASK> taskCreator) static <TASK> List<TASK>
degreePartitionWithBatchSize
(com.carrotsearch.hppc.BitSet bitset, PartitionUtils.DegreeFunction degrees, long degreesPerBatch, Function<IteratorPartition, TASK> taskCreator) static <TASK> List<TASK>
degreePartitionWithBatchSize
(Graph graph, long batchSize, Function<DegreePartition, TASK> taskCreator) numberAlignedPartitioning
(int concurrency, long nodeCount, long alignTo) static <TASK> List<TASK>
numberAlignedPartitioning
(int concurrency, long nodeCount, long alignTo, Function<Partition, TASK> taskCreator) numberAlignedPartitioningWithMaxSize
(int concurrency, long nodeCount, long alignTo, long maxPartitionSize) static <TASK> List<TASK>
numberAlignedPartitioningWithMaxSize
(int concurrency, long nodeCount, long alignTo, long maxPartitionSize, Function<Partition, TASK> taskCreator) static <TASK> List<TASK>
rangePartition
(int concurrency, long nodeCount, Function<Partition, TASK> taskCreator, Optional<Integer> minBatchSize) rangePartitionActualBatchSizes
(int concurrency, long nodeCount, Optional<Integer> minBatchSize) static <TASK> List<TASK>
rangePartitionWithBatchSize
(long nodeCount, long batchSize, Function<Partition, TASK> taskCreator)
-
Method Details
-
rangePartition
-
rangePartitionWithBatchSize
-
numberAlignedPartitioning
-
numberAlignedPartitioning
-
numberAlignedPartitioningWithMaxSize
-
numberAlignedPartitioningWithMaxSize
-
degreePartition
-
degreePartition
public static <TASK> List<TASK> degreePartition(long nodeCount, long relationshipCount, PartitionUtils.DegreeFunction degrees, int concurrency, Function<DegreePartition, TASK> taskCreator, Optional<Integer> minBatchSize) -
customDegreePartitionWithBatchSize
public static <TASK> List<TASK> customDegreePartitionWithBatchSize(Graph graph, int concurrency, LongToIntFunction customDegreeFunction, Function<DegreePartition, TASK> taskCreator, Optional<Integer> minBatchSize, Optional<Long> weightSum) -
degreePartitionStream
public static Stream<DegreePartition> degreePartitionStream(long nodeCount, long relationshipCount, int concurrency, PartitionUtils.DegreeFunction degrees) Returns a lazy stream of many small partitions (in contrast to list of few big ones) -
degreePartitionWithBatchSize
public static <TASK> List<TASK> degreePartitionWithBatchSize(Graph graph, long batchSize, Function<DegreePartition, TASK> taskCreator) -
degreePartitionWithBatchSize
public static <TASK> List<TASK> degreePartitionWithBatchSize(long nodeCount, PartitionUtils.DegreeFunction degrees, long batchSize, Function<DegreePartition, TASK> taskCreator) -
degreePartitionWithBatchSize
public static <TASK> List<TASK> degreePartitionWithBatchSize(com.carrotsearch.hppc.BitSet bitset, PartitionUtils.DegreeFunction degrees, long degreesPerBatch, Function<IteratorPartition, TASK> taskCreator) -
rangePartitionActualBatchSizes
-
blockAlignedPartitioning
-