|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkorat.utils.cv.CVReaderDelta
public class CVReaderDelta
| Field Summary | |
|---|---|
private BitInputStream |
bis
|
private BitInputStream |
bisDelta
|
private int |
cnt
|
private int |
fullFormatRatio
|
private int[] |
lastCV
|
private int |
numBitsPerCVIndex
|
private int |
numBitsPerElem
|
private long |
numCVs
|
private long |
numCVsRead
|
private int |
numElemsPerCV
|
private boolean |
predicateOK
|
| Constructor Summary | |
|---|---|
protected |
CVReaderDelta(InputStream isFull,
InputStream isDelta)
|
protected |
CVReaderDelta(String fileName)
|
| Method Summary | |
|---|---|
void |
close()
Closes underlying files, streams, etc. |
long |
getNumCVs()
Returns number of candidate vectors in the file |
long |
getNumCVsRead()
Returns how many vectors have been read already. |
int |
getNumElemsPerCV()
Returns number of elements per candidate vector |
boolean |
hasNext()
Returns are there more vectors to be read. |
boolean |
isPredicateOK()
Call this method immediately after calling readCV to find out if the read vector passes predicate check or not |
int[] |
readCV()
Reads next candidate vector from file. |
protected static boolean |
readDelta(int[] cv,
int[] lastCV,
IBitReader bisDelta,
int numBitsPerCVIndex,
int numBitsPerElem)
|
protected static Pair<Long,Boolean> |
readFullFormatVector(int[] cv,
IBitReader br,
int numBitsPerElem)
|
private void |
readHeader()
|
protected void |
skipDeltaBits(long bits)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private BitInputStream bis
private BitInputStream bisDelta
private long numCVs
private int numElemsPerCV
private int numBitsPerElem
private int numBitsPerCVIndex
private int fullFormatRatio
private long numCVsRead
private boolean predicateOK
private int[] lastCV
private int cnt
| Constructor Detail |
|---|
protected CVReaderDelta(String fileName)
throws IOException
IOException
protected CVReaderDelta(InputStream isFull,
InputStream isDelta)
throws IOException
IOException| Method Detail |
|---|
private void readHeader()
throws IOException
IOException
public void close()
throws IOException
ICVReader
close in interface ICVReaderIOException - if an I/O error occurs
public int[] readCV()
throws IOException
ICVReader
readCV in interface ICVReaderIOException - if an I/O error occurs
protected static Pair<Long,Boolean> readFullFormatVector(int[] cv,
IBitReader br,
int numBitsPerElem)
throws IOException
IOException
protected static boolean readDelta(int[] cv,
int[] lastCV,
IBitReader bisDelta,
int numBitsPerCVIndex,
int numBitsPerElem)
throws IOException
IOException
protected void skipDeltaBits(long bits)
throws IOException
IOExceptionpublic long getNumCVs()
ICVReader
getNumCVs in interface ICVReaderpublic long getNumCVsRead()
ICVReader
getNumCVsRead in interface ICVReaderpublic int getNumElemsPerCV()
ICVReader
getNumElemsPerCV in interface ICVReaderpublic boolean hasNext()
ICVReader
hasNext in interface ICVReaderpublic boolean isPredicateOK()
ICVReader
isPredicateOK in interface ICVReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||