Class ReaderColumnSelection

    • Method Detail

      • nextRow

        public final DblArray nextRow()
        Gets the next row, null when no more rows.
        Returns:
        next row
      • getCurrentRowIndex

        public int getCurrentRowIndex()
        Get the current row index that the reader is at.
        Returns:
        The row index
      • createReader

        public static ReaderColumnSelection createReader​(MatrixBlock rawBlock,
                                                         IColIndex colIndices,
                                                         boolean transposed)
        Create an reader of the matrix block that is able to iterate though all the rows and return as dense double arrays. Note the reader reuse the return, therefore if needed for something please copy the returned rows.
        Parameters:
        rawBlock - The block to iterate though
        colIndices - The column indexes to extract and insert into the double array
        transposed - If the raw block should be treated as transposed
        Returns:
        A reader of the columns specified
      • createReader

        public static ReaderColumnSelection createReader​(MatrixBlock rawBlock,
                                                         IColIndex colIndices,
                                                         boolean transposed,
                                                         int rl,
                                                         int ru)
        Create an reader of the matrix block that is able to iterate though all the rows and return as dense double arrays. Note the reader reuse the return, therefore if needed for something please copy the returned rows.
        Parameters:
        rawBlock - The block to iterate though
        colIndices - The column indexes to extract and insert into the double array
        transposed - If the raw block should be treated as transposed
        rl - The row to start at
        ru - The row to end at (not inclusive)
        Returns:
        A reader of the columns specified