public class PermutatedMinsFileProducer extends Object
PermutatedMinsFile
class.
The file contains instances of UnitPermutatedMin
class.
That means it contains pairs {min(pi(T(d))), d}, where:
add(org.egothor.core.DocumentData)
.commit(java.lang.String)
sorts and writes data to filesystem
and returns instance of PermutatedMinsFile
class.Constructor and Description |
---|
PermutatedMinsFileProducer(long permID)
Initializes the object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DocumentData doc)
Adds document to the file.
|
PermutatedMinsFile |
commit(String location)
Commit the changes in the buffer to the main file.
|
List<UnitPermutatedMin> |
getBuffer() |
long |
getPermID() |
String |
toString() |
public PermutatedMinsFileProducer(long permID)
permID
- permutation assigned to this filepublic List<UnitPermutatedMin> getBuffer()
public long getPermID()
public void add(DocumentData doc)
DocumentData
object, and appends every field of the map
that corresponds to our permutation to its content to the internal buffer.
The appended fields are then released from the
DocumentPermutatedMins
field of
DocumentData
object.doc
- document to be addedpublic PermutatedMinsFile commit(String location)
Copyright © 2016 Egothor. All Rights Reserved.