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
Modifier and Type Method Description long
globalPointer(int localIndex, long localPointer)
Returns the global document pointer given a local index and a local document pointer.long
localPointer(long globalPointer)
Returns the local document pointer corresponding to a global document pointer.long
numberOfDocuments(int localIndex)
Returns the number of documents that will be assigned to the given local index.-
Methods inherited from interface it.unimi.di.big.mg4j.index.cluster.ClusteringStrategy
numberOfLocalIndices
-
-
-
-
Method Detail
-
globalPointer
long globalPointer(int localIndex, long 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 inlocalIndex
.- Returns:
- the global document pointer.
-
localPointer
long localPointer(long 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
long 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
.
-
-