Interface MatrixBlockDataInput
- All Known Implementing Classes:
ByteBufferDataInput,CacheDataInput,FastBufferedDataInputStream
public interface MatrixBlockDataInput
Any 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
Modifier and TypeMethodDescriptionlongreadDoubleArray(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 Details
-
readDoubleArray
Reads 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
Reads 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
-