drasys.or.matrix.complex
Interface MatrixReaderI
- All Known Implementing Classes:
- SMFReader
- public interface MatrixReaderI
Complex matrix 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.
readMatrix
public int readMatrix(MatrixI matrix)
throws java.io.IOException
- Reads a matrix from the stream.
Any elements in the matrix not appearing in the input stream will remain unchanged.
The size record is used to make sure the input matrix will fit in the container matrix.
- Returns:
- the number of elements read from the stream.
- Throws:
- java.lang.ArrayIndexOutOfBoundsException - if the input matrix size or
an element's index is invalid for the container matrix size.
readMatrix
public int readMatrix(SizableMatrixI matrix,
boolean resize)
throws java.io.IOException
- Reads a matrix from the stream.
Any elements in the matrix not appearing in the input stream will remain unchanged.
The size record is used to set the size of the container matrix if 'resize' is 'true'.
- Returns:
- the number of elements read from the stream.
- Throws:
- java.lang.ArrayIndexOutOfBoundsException - if the input matrix size or
an element's index is invalid for the container matrix size.
Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com