public class PermutationWriter extends Object implements Closeable
| Constructor and Description |
|---|
PermutationWriter(String basename) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(it.unimi.dsi.fastutil.ints.Int2IntMap permPiece)
Append a piece of the permutation.
|
void |
close() |
protected int |
getBreakPoint(int previousWritten,
it.unimi.dsi.fastutil.ints.IntArrayList smallIndices) |
protected int |
getBreakPoint(int previousWritten,
it.unimi.dsi.fastutil.ints.IntArrayList smallIndices,
int chunkSize)
Return the index in smallIndices where there is a gap in sequence, chunkSize,
whichever is smaller.
|
void |
writeOnePiece(int firstSmallIndex,
it.unimi.dsi.fastutil.ints.IntArrayList largeIndices) |
void |
writeOnePiece(int previousWritten,
int firstSmallIndex,
it.unimi.dsi.fastutil.ints.IntArrayList largeIndices,
int n) |
public PermutationWriter(String basename)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic void append(it.unimi.dsi.fastutil.ints.Int2IntMap permPiece)
throws IOException
permPiece - map from query indices to small indices.IOException - If an error occurs writing the data to disk.public void writeOnePiece(int firstSmallIndex,
it.unimi.dsi.fastutil.ints.IntArrayList largeIndices)
throws IOException
IOExceptionpublic void writeOnePiece(int previousWritten,
int firstSmallIndex,
it.unimi.dsi.fastutil.ints.IntArrayList largeIndices,
int n)
throws IOException
IOExceptionprotected int getBreakPoint(int previousWritten,
it.unimi.dsi.fastutil.ints.IntArrayList smallIndices)
throws IOException
IOExceptionprotected int getBreakPoint(int previousWritten,
it.unimi.dsi.fastutil.ints.IntArrayList smallIndices,
int chunkSize)
throws IOException
previousWritten - index of the position where to start looking for a breakpoint.smallIndices - list of indices.chunkSize - IOExceptionCopyright © 2017 Campagne Laboratory. All rights reserved.