it.unimi.di.mg4j.index.cluster
Class DocumentalStrategies
java.lang.Object
it.unimi.di.mg4j.index.cluster.DocumentalStrategies
public class DocumentalStrategies
- extends Object
Static utility methods for documental strategies.
- Author:
- Alessandro Arabito, Sebastiano Vigna
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentalStrategies
protected DocumentalStrategies()
uniform
public static ContiguousDocumentalStrategy uniform(int numberOfLocalIndices,
int 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 in index
in
numberOfLocalIndices
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
in
numberOfLocalIndices
local indices of approximately equal size by
picking one every numberOfLocalIndices
documents in a round-robin fashion.