org.egothor.duplicity.algorithm
Class SentenceLevelPermutatedMinsFiller

java.lang.Object
  extended by org.egothor.duplicity.algorithm.PermutatedMinsFiller
      extended by org.egothor.duplicity.algorithm.SentenceLevelPermutatedMinsFiller

public class SentenceLevelPermutatedMinsFiller
extends PermutatedMinsFiller

Fills the DocumentPermutatedMins with values corrensponding to the given sequence of tokens. Works on sentence level.

Author:
Kate�ina Dufkov�

Constructor Summary
protected SentenceLevelPermutatedMinsFiller(long seed)
           
 
Method Summary
protected  void insertMins(DocumentPermutatedMins result, long documentUID, int documentDBRevision, short paragraph, short sentenceInParagraph, long[] mins)
          Inserts all mins to result.
protected  boolean newUnit(short lastParagraph, int lastSentence, short paragraph, int sentence)
          On paragraph level, new units is when lastSentence is different from sentence.
 
Methods inherited from class org.egothor.duplicity.algorithm.PermutatedMinsFiller
computeDocumentMins, createNew, createNew, getSeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SentenceLevelPermutatedMinsFiller

protected SentenceLevelPermutatedMinsFiller(long seed)
Method Detail

newUnit

protected boolean newUnit(short lastParagraph,
                          int lastSentence,
                          short paragraph,
                          int sentence)
On paragraph level, new units is when lastSentence is different from sentence.

Specified by:
newUnit in class PermutatedMinsFiller
Parameters:
lastParagraph - ignored
lastSentence - ordinal number of paragraph of last token
paragraph - ignored
sentence - ordinal number of paragraph of actual token
Returns:
true on new unit

insertMins

protected void insertMins(DocumentPermutatedMins result,
                          long documentUID,
                          int documentDBRevision,
                          short paragraph,
                          short sentenceInParagraph,
                          long[] mins)
Inserts all mins to result. After it sets fields of mins to Integer.MAX_VALUE.

Specified by:
insertMins in class PermutatedMinsFiller
Parameters:
result - DocumentPermutatedMins to which the values will be added
documentUID - identificator of the unit
documentDBRevision - revision number of the document in the document database
paragraph - ordinal number of paragraph
sentenceInParagraph - ordinal number of sentence in the paragraph
mins - minimums