public class PermutatedMinsFile extends DuplicityCheckingFile
UnitPermutatedMin class.
That means it contains pairs {min(pi(T(d))), d}, where:
PermutatedMinsFileProducer
or read from the filesystem.merge(org.egothor.duplicity.file.PermutatedMinsFile) method.| Constructor and Description |
|---|
PermutatedMinsFile(long permID,
String location)
Initialializes the file already written to filesystem.
|
| Modifier and Type | Method and Description |
|---|---|
SimilarUnitPairsFile |
createSimilarUnitPairsFile()
From this files, creates the SimilarUnitPairsFile corresponding to it.
|
String |
dump()
Dumps the content of the file to string.
|
String |
getFilename()
Returns the filename corresponding to this file.
|
long |
getPermID() |
SimilarUnitPairsTempFile |
getSimilarities(PermutatedMinsFile mpuf)
Merges two files externally, on filesystem.
|
boolean |
hasTheSameContent(DuplicityCheckingFile file)
Checks if two files has the same content.
|
void |
merge(PermutatedMinsFile mpuf)
Merges two files externally, on filesystem.
|
void |
remove(Set<DocumentUnitID> toRemove)
Removes all occurences of documents given in the set from the file.
|
String |
toString() |
delete, getLocation, getOut, hasTheSameContentpublic PermutatedMinsFile(long permID,
String location)
throws FileNotFoundException
getFilename()
and will be searched in the location directory.permID - identification of the permutation to be assigned to this filelocation - path and name of the directory in which the file will be created,
must end with "/" signFileNotFoundException - if the file already existspublic String getFilename()
Constants.PERMUTATED_MINS_FILE_PREFIX<permID>.getFilename in class DuplicityCheckingFilepublic long getPermID()
public SimilarUnitPairsFile createSimilarUnitPairsFile()
SimilarUnitPairsFile written to the filesystem.public void merge(PermutatedMinsFile mpuf) throws IOException, MergeException
mpuf - file to be merged into thisMergeException - on attempt to merge files corresponding to different permutations
or if temporary file could not be createdIOExceptionpublic SimilarUnitPairsTempFile getSimilarities(PermutatedMinsFile mpuf) throws IOException, MergeException
mpuf - file to be merged into thisMergeException - on attempt to merge files corresponding to different permutations
or if temporary file could not be createdIOExceptionpublic String toString()
toString in class DuplicityCheckingFilepublic String dump()
public void remove(Set<DocumentUnitID> toRemove) throws IOException
toRemove - set of document ids to removeIOExceptionpublic boolean hasTheSameContent(DuplicityCheckingFile file)
file - the second file to be testedCopyright © 2016 Egothor. All Rights Reserved.