Interface MatrixBlockDataInput
-
- All Known Implementing Classes:
ByteBufferDataInput,CacheDataInput,FastBufferedDataInputStream
public interface MatrixBlockDataInputAny data input that is intended to support fast deserialization / read of entire blocks should implement this interface. On read of a matrix block we check if the input stream is an implementation of this interface, if yes we let the implementation directly pass the entire block instead of value-by-value. Known implementation classes: - FastBufferedDataInputStream - CacheDataInput
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longreadDoubleArray(int len, double[] varr)Reads the double array from the data input into the given dense block and returns the number of non-zeros.longreadSparseRows(int rlen, long nnz, SparseBlock rows)Reads the sparse rows array from the data input into a sparse block and returns the number of non-zeros.
-
-
-
Method Detail
-
readDoubleArray
long readDoubleArray(int len, double[] varr) throws IOExceptionReads the double array from the data input into the given dense block and returns the number of non-zeros.- Parameters:
len- ?varr- ?- Returns:
- number of non-zeros
- Throws:
IOException- if IOException occurs
-
readSparseRows
long readSparseRows(int rlen, long nnz, SparseBlock rows) throws IOExceptionReads the sparse rows array from the data input into a sparse block and returns the number of non-zeros.- Parameters:
rlen- number of rowsnnz- number of non-zerosrows- sparse block- Returns:
- number of non-zeros
- Throws:
IOException- if IOExcepton occurs
-
-