org.egothor.duplicity.algorithm
Class ParagraphLevelPermutatedMinsFiller

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

public class ParagraphLevelPermutatedMinsFiller
extends PermutatedMinsFiller

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

Author:
Kate�ina Dufkov�

Constructor Summary
protected ParagraphLevelPermutatedMinsFiller(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 lastParagraph is different from paragraph.
 
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

ParagraphLevelPermutatedMinsFiller

protected ParagraphLevelPermutatedMinsFiller(long seed)
Method Detail

newUnit

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

Specified by:
newUnit in class PermutatedMinsFiller
Parameters:
lastParagraph - ordinal number of paragraph of last token
lastSentence - ignored
paragraph - ordinal number of paragraph of actual token
sentence - ignored
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 document
documentDBRevision - revision number of the document in the document database
paragraph - ordinal number of paragraph
sentenceInParagraph - ordinal number of sentence in the paragraph - ignored
mins - minimums