|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkorat.utils.cv.CVFinder
public class CVFinder
| Field Summary | |
|---|---|
private long |
bodyStart
|
private BitRandomAccessFile |
cvFile
|
(package private) String |
cvFileName
|
private int |
cvSizeInBits
|
private int |
numBitsPerElem
|
(package private) long |
numCVs
|
private int |
numElemsPerCV
|
private boolean |
predicateOK
|
| Constructor Summary | |
|---|---|
protected |
CVFinder(String cvFileName)
|
| Method Summary | |
|---|---|
void |
close()
Closes underlying files, streams, etc. |
long |
find(int[] cv)
Finds the index for the given candidate vector. |
long[] |
find(int[][] cvs)
Finds indexes for the given candidate vectors |
long |
getNumCVs()
Gets number of candidate vectors in a file |
int |
getNumElemsPerCV()
Gets number of elements per candidate vector |
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(long idx)
Reads idx-th 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 |
|---|
long numCVs
private int numElemsPerCV
private int numBitsPerElem
private long bodyStart
private int cvSizeInBits
private boolean predicateOK
String cvFileName
private BitRandomAccessFile cvFile
| Constructor Detail |
|---|
protected CVFinder(String cvFileName)
throws IOException
IOException| Method Detail |
|---|
private void readHeader()
throws IOException
IOExceptionpublic long getNumCVs()
ICVFinder
getNumCVs in interface ICVFinderpublic int getNumElemsPerCV()
ICVFinder
getNumElemsPerCV in interface ICVFinderpublic boolean isPredicateOK()
ICVFinder
isPredicateOK in interface ICVFinder
public int[] readCV(long idx)
throws IOException
ICVFinder
readCV in interface ICVFinderidx - index of candidate vector in the file
IOException - if an I/O error occurs
public long find(int[] cv)
throws IOException
ICVFinder
find in interface ICVFindercv - candidate vector to search for
IOException - if an I/O error occurs
public long[] find(int[][] cvs)
throws IOException
ICVFinder
find in interface ICVFindercvs - candidate vectors to search for
IOException - if an I/O error occurs
public void close()
throws IOException
ICVFinder
close in interface ICVFinderIOExceptionpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||