drasys.or.matrix
Interface VectorReaderI
- All Known Implementing Classes:
- SVFReader
- public interface VectorReaderI
Vector readers.
setIgnoreInvalid
public void setIgnoreInvalid(boolean ignore)
- If 'ignore' is 'true' then any elements with invalid indices will be ignored.
If 'ignore' is 'false' then an InvalidArrayIndexException will be thrown for elements with invalid indices.
The default is to throw an exception for invalid elements.
readVector
public int readVector(VectorI vector)
throws java.io.IOException
- Reads a vector from the stream.
Any elements in the vector not appearing in the input stream will remain unchanged.
The size record is used to make sure the input vector will fit in the container vector.
- Returns:
- the number of elements read from the stream.
- Throws:
- java.lang.ArrayIndexOutOfBoundsException - if the input vector size or
an element's index is invalid for the container vector size.
readVector
public int readVector(SizableVectorI vector,
boolean resize)
throws java.io.IOException
- Reads a vector from the stream.
Any elements in the vector not appearing in the input stream will remain unchanged.
The size record is used to set the size of the container vector if 'resize' is 'true'.
- Returns:
- the number of elements read from the stream.
- Throws:
- java.lang.ArrayIndexOutOfBoundsException - if the input vector size or
an element's index is invalid for the container vector size.
Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com