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

All Superinterfaces:
PartitioningStrategy, Serializable
All Known Implementing Classes:
ContiguousLexicalStrategy

public interface LexicalPartitioningStrategy
extends PartitioningStrategy

A way to associate a term number with a local index out of a given set and a local term number in the local index.

When partitioning lexically an index (i.e., termwise), we need a way to associate to each term a local index (the index that will contain the postings of that term) and a local term number (the number of the term in the local index).

Usually, a lexical partitioning strategy has a matching LexicalClusteringStrategy whose methods satisfy the following equations:

 globalNumber(localIndex(t), localNumber(t)) = t
 <localIndex(globalNumber(i, l)), localNumber(globalNumber(i, l))> = <i, l>
 

Author:
Alessandro Arrabito, Sebastiano Vigna

Method Summary
 int localIndex(int globalNumber)
          Returns the index to which a given term number is mapped by this strategy.
 int localNumber(int globalNumber)
          Returns the local term number given a global term number.
 
Methods inherited from interface it.unimi.di.mg4j.index.cluster.PartitioningStrategy
numberOfLocalIndices, properties
 

Method Detail

localIndex

int localIndex(int globalNumber)
Returns the index to which a given term number is mapped by this strategy.

Parameters:
globalNumber - the term global number.
Returns:
the corresponding local index, or -1 if the term should be removed from the partitioned index.

localNumber

int localNumber(int globalNumber)
Returns the local term number given a global term number.

Parameters:
globalNumber - a global term number.
Returns:
the corresponding local term number, or -1 if the term should be removed from the partitioned index.