|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkorat.utils.cv.CVFinderDelta
public class CVFinderDelta
| Nested Class Summary | |
|---|---|
static class |
CVFinderDelta.FinderResult
|
| Field Summary | |
|---|---|
(package private) boolean |
binSearchFound
|
(package private) int |
binSearchIdx
|
private long |
bodyStart
|
private int[][] |
buffer
|
private BitRandomAccessFile |
cvDeltaFile
|
private String |
cvDeltaFileName
|
private BitRandomAccessFile |
cvFile
|
private String |
cvFileName
|
private int |
dataSizeInBits
|
private int |
fullFormatRatio
|
private int |
numBitsPerCVIndex
|
private int |
numBitsPerElem
|
private long |
numCVs
|
private int |
numElemsPerCV
|
private int |
numFullFormatVectors
|
private long[] |
offsets
|
private boolean |
predicateOK
|
| Constructor Summary | |
|---|---|
protected |
CVFinderDelta(String cvFileName)
|
| Method Summary | |
|---|---|
private void |
binSearch(int[] cvToFind,
IIntList fieldAccessList)
|
void |
close()
Closes underlying files, streams, etc. |
long |
find(int[] cv)
sequential search |
long[] |
find(int[][] cvs)
sequential search |
CVFinderDelta.FinderResult |
find(int[] cv,
IIntList fieldAccessList)
|
long |
getNumCVs()
Gets number of candidate vectors in a file |
int |
getNumElemsPerCV()
Gets number of elements per candidate vector |
private void |
initBuffer()
|
boolean |
isPredicateOK()
Call this method immediately after calling readCV to find out if the read vector passes predicate check or not |
int[] |
readCV(long idx)
Reads idx-th candidate vector from file |
private void |
readHeader()
|
private long |
readOffset(long idx,
int[] cv)
|
private CVFinderDelta.FinderResult |
seqSearch(int[] cvToFind,
int[] lastCV,
IIntList fieldAccessList)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private long numCVs
private int numElemsPerCV
private int numBitsPerElem
private int fullFormatRatio
private int numFullFormatVectors
private long bodyStart
private boolean predicateOK
private String cvFileName
private String cvDeltaFileName
private BitRandomAccessFile cvFile
private BitRandomAccessFile cvDeltaFile
private int dataSizeInBits
private int numBitsPerCVIndex
private int[][] buffer
private long[] offsets
int binSearchIdx
boolean binSearchFound
| Constructor Detail |
|---|
protected CVFinderDelta(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
private long readOffset(long idx,
int[] cv)
throws IOException
IOException
public long find(int[] cv)
throws IOException
find in interface ICVFindercv - candidate vector to search for
IOException - if an I/O error occurs
public long[] find(int[][] cvs)
throws IOException
find in interface ICVFindercvs - candidate vectors to search for
IOException - if an I/O error occurs
private void initBuffer()
throws IOException
IOException
public CVFinderDelta.FinderResult find(int[] cv,
IIntList fieldAccessList)
throws IOException
IOException
private CVFinderDelta.FinderResult seqSearch(int[] cvToFind,
int[] lastCV,
IIntList fieldAccessList)
throws IOException
IOException
private void binSearch(int[] cvToFind,
IIntList fieldAccessList)
public void close()
throws IOException
ICVFinder
close in interface ICVFinderIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||