Class DocumentalStrategies
- java.lang.Object
-
- it.unimi.di.big.mg4j.index.cluster.DocumentalStrategies
-
public class DocumentalStrategies extends Object
Static utility methods for documental strategies.- Author:
- Alessandro Arabito, Sebastiano Vigna
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DocumentalStrategies()
-
Method Summary
Modifier and Type Method Description static DocumentalPartitioningStrategy
interleaved(int numberOfLocalIndices, int numberOfDocuments)
Creates an interleaved partitioning strategy.static ContiguousDocumentalStrategy
uniform(int numberOfLocalIndices, long numberOfDocuments)
Creates an equally spaced contiguous documental strategy.
-
-
-
Method Detail
-
uniform
public static ContiguousDocumentalStrategy uniform(int numberOfLocalIndices, long numberOfDocuments)
Creates an equally spaced contiguous documental strategy.- Parameters:
numberOfLocalIndices
- the number of local indices.numberOfDocuments
- the global number of documents.- Returns:
- a
ContiguousDocumentalStrategy
that will partition inindex
innumberOfLocalIndices
local indices of approximately equal size.
-
interleaved
public static DocumentalPartitioningStrategy interleaved(int numberOfLocalIndices, int numberOfDocuments)
Creates an interleaved partitioning strategy.- Parameters:
numberOfLocalIndices
- the number of local indices.numberOfDocuments
- the global number of documents.- Returns:
- a strategy that will partition in
index
innumberOfLocalIndices
local indices of approximately equal size by picking one everynumberOfLocalIndices
documents in a round-robin fashion.
-
-