korat.utils.cv
Interface ICVReader

All Known Implementing Classes:
CVReader, CVReaderDelta

public interface ICVReader

Interface for sequential reading of candidate vectors from the candidate-vectors-file.

Author:
Aleksandar Milicevic

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.
 

Method Detail

readCV

int[] readCV()
             throws IOException
Reads next candidate vector from file.

Returns:
next candidate vector from file
Throws:
IOException - if an I/O error occurs

isPredicateOK

boolean isPredicateOK()
Call this method immediately after calling readCV to find out if the read vector passes predicate check or not

Returns:
is predicate ok or not for the last read candidate vector

close

void close()
           throws IOException
Closes underlying files, streams, etc.

Throws:
IOException - if an I/O error occurs

hasNext

boolean hasNext()
Returns are there more vectors to be read.

Returns:
are there more vector to be read

getNumCVs

long getNumCVs()
Returns number of candidate vectors in the file

Returns:
number of candidate vectors in the file

getNumElemsPerCV

int getNumElemsPerCV()
Returns number of elements per candidate vector

Returns:
number of elements per candidate vector

getNumCVsRead

long getNumCVsRead()
Returns how many vectors have been read already.

Returns:
how many vectors have been read already