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 Type
    Method
    Description
    long
    readDoubleArray(int len, double[] varr)
    Reads the double array from the data input into the given dense block and returns the number of non-zeros.
    long
    readSparseRows(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

      long readDoubleArray(int len, double[] varr) throws IOException
      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

      long readSparseRows(int rlen, long nnz, SparseBlock rows) throws IOException
      Reads the sparse rows array from the data input into a sparse block and returns the number of non-zeros.
      Parameters:
      rlen - number of rows
      nnz - number of non-zeros
      rows - sparse block
      Returns:
      number of non-zeros
      Throws:
      IOException - if IOExcepton occurs