epfl.io
Class VectorManualPeriodReader

java.lang.Object
  |
  +--epfl.io.VectorUnknownPeriodReader
        |
        +--epfl.io.VectorManualPeriodReader
All Implemented Interfaces:
VectorReader
Direct Known Subclasses:
VectorShufflePeriodReader

public class VectorManualPeriodReader
extends VectorUnknownPeriodReader

A double vector manual periodic reader. Period vectors can be read and then the reader must be reset.


Constructor Summary
VectorManualPeriodReader(VectorReader in)
          Creates a new periodic reader.
VectorManualPeriodReader(VectorReader in, boolean makePeriodicCopy)
          Creates a new periodic reader
 
Method Summary
 double[] read()
          Reads a vector in stream
 void reset()
          Resets the reader for a new run (period vectors can be read)
 
Methods inherited from class epfl.io.VectorUnknownPeriodReader
close, period, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorManualPeriodReader

public VectorManualPeriodReader(VectorReader in,
                                boolean makePeriodicCopy)
Creates a new periodic reader
Parameters:
in - the underlying vector reader
makePeriodicCopy - flag saying if on each period a new vector is built

VectorManualPeriodReader

public VectorManualPeriodReader(VectorReader in)
Creates a new periodic reader. Each period a new vector is built
Parameters:
in - the underlying vector reader
Method Detail

read

public double[] read()
              throws java.io.IOException
Reads a vector in stream
Overrides:
read in class VectorUnknownPeriodReader
Throws:
java.io.IOException - if period vectors have been read or the stream is closed or it is unable to read size doubles

reset

public void reset()
Resets the reader for a new run (period vectors can be read)