Class MatrixWriter

    • Constructor Detail

      • MatrixWriter

        public MatrixWriter()
    • Method Detail

      • writeMatrixToHDFS

        public abstract void writeMatrixToHDFS​(MatrixBlock src,
                                               String fname,
                                               long rlen,
                                               long clen,
                                               int blen,
                                               long nnz,
                                               boolean diag)
                                        throws IOException
        Throws:
        IOException
      • writeEmptyMatrixToHDFS

        public abstract void writeEmptyMatrixToHDFS​(String fname,
                                                    long rlen,
                                                    long clen,
                                                    int blen)
                                             throws IOException
        Writes a minimal entry to represent an empty matrix on hdfs.
        Parameters:
        fname - file name
        rlen - number of rows
        clen - number of columns
        blen - number of rows/cols in block
        Throws:
        IOException - if IOException occurs
      • createMatrixBlocksForReuse

        public static MatrixBlock[] createMatrixBlocksForReuse​(long rlen,
                                                               long clen,
                                                               int blen,
                                                               boolean sparse,
                                                               long nonZeros)
      • getMatrixBlockForReuse

        public static MatrixBlock getMatrixBlockForReuse​(MatrixBlock[] blocks,
                                                         int rows,
                                                         int cols,
                                                         int blen)