it.unimi.di.mg4j.index.cluster
Interface DocumentalClusteringStrategy

All Superinterfaces:
ClusteringStrategy, Serializable
All Known Implementing Classes:
ContiguousDocumentalStrategy, IdentityDocumentalStrategy

public interface DocumentalClusteringStrategy
extends ClusteringStrategy

A way to associate (quite bidirectionally) local and global document pointers.

A DocumentalCluster needs a way to turn local document pointer into global pointers, but also global pointers into local pointers (for skipping).

Author:
Alessandro Arrabito, Sebastiano Vigna
See Also:
DocumentalPartitioningStrategy

Method Summary
 int globalPointer(int localIndex, int localPointer)
          Returns the global document pointer given a local index and a local document pointer.
 int localPointer(int globalPointer)
          Returns the local document pointer corresponding to a global document pointer.
 int numberOfDocuments(int localIndex)
          Returns the number of documents that will be assigned to the given local index.
 
Methods inherited from interface it.unimi.di.mg4j.index.cluster.ClusteringStrategy
numberOfLocalIndices
 

Method Detail

globalPointer

int globalPointer(int localIndex,
                  int localPointer)
Returns the global document pointer given a local index and a local document pointer.

Parameters:
localIndex - the local index.
localPointer - the local document pointer in localIndex.
Returns:
the global document pointer.

localPointer

int localPointer(int globalPointer)
Returns the local document pointer corresponding to a global document pointer.

Parameters:
globalPointer - a global document pointer.
Returns:
the corresponding local document pointer.

numberOfDocuments

int numberOfDocuments(int localIndex)
Returns the number of documents that will be assigned to the given local index.

Parameters:
localIndex - the local index.
Returns:
the number of documents that will be assigned to localIndex.