|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkorat.utils.cv.CVReader
public class CVReader
Utility for reading candidate vector files written according to CVWriter's format.
| Field Summary | |
|---|---|
private BitInputStream |
bis
|
private int |
numBitsPerElem
|
private long |
numCVs
|
private long |
numCVsRead
|
private int |
numElemsPerCV
|
private boolean |
predicateOK
|
| Constructor Summary | |
|---|---|
protected |
CVReader(InputStream in)
|
protected |
CVReader(String fileName)
|
| Method Summary | |
|---|---|
void |
close()
Closes underlying files, streams, etc. |
long |
getNumCVs()
Returns number of candidate vectors in the file |
long |
getNumCVsLeftToRead()
|
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 |
static void |
main(String[] args)
|
int[] |
readCV()
Reads next candidate vector from file. |
private void |
readHeader()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private BitInputStream bis
private long numCVs
private int numElemsPerCV
private int numBitsPerElem
private long numCVsRead
private boolean predicateOK
| Constructor Detail |
|---|
protected CVReader(String fileName)
throws IOException
IOException
protected CVReader(InputStream in)
throws IOException
IOException| Method Detail |
|---|
private void readHeader()
throws IOException
IOException
public int[] readCV()
throws IOException
ICVReader
readCV in interface ICVReaderIOException - if an I/O error occurs
public void close()
throws IOException
ICVReader
close in interface ICVReaderIOException - if an I/O error occurspublic boolean hasNext()
ICVReader
hasNext in interface ICVReaderpublic long getNumCVs()
ICVReader
getNumCVs in interface ICVReaderpublic int getNumElemsPerCV()
ICVReader
getNumElemsPerCV in interface ICVReaderpublic long getNumCVsRead()
ICVReader
getNumCVsRead in interface ICVReaderpublic long getNumCVsLeftToRead()
public boolean isPredicateOK()
ICVReader
isPredicateOK in interface ICVReaderpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||