org.egothor.duplicity.algorithm
Class DocumentLevelPermutatedMinsFiller

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

public class DocumentLevelPermutatedMinsFiller
extends PermutatedMinsFiller

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

Author:
Kate�ina Dufkov�

Constructor Summary
protected DocumentLevelPermutatedMinsFiller(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 document level, no new units will be encountered.
 
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

DocumentLevelPermutatedMinsFiller

protected DocumentLevelPermutatedMinsFiller(long seed)
Method Detail

newUnit

protected boolean newUnit(short lastParagraph,
                          int lastSentence,
                          short paragraph,
                          int sentence)
On document level, no new units will be encountered.

Specified by:
newUnit in class PermutatedMinsFiller
Parameters:
lastParagraph - ignored
lastSentence - ignored
paragraph - ignored
sentence - ignored
Returns:
false

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 - ignored
sentenceInParagraph - ordinal number of sentence in the paragraph - ignored
mins - minimums