Class BlockMatrixLayout

  • All Implemented Interfaces:
    java.io.Serializable

    public final class BlockMatrixLayout
    extends java.lang.Object
    implements java.io.Serializable
    This class describes the layout (size, order) of a square block of data within a block matrix.
    See Also:
    Serialized Form
    • Field Detail

      • blockArea

        protected final int blockArea
        Total size of a block (area).
      • blockStripe

        public final int blockStripe
        Length of one side (stripe) of a square block.
      • columns

        public final int columns
        Number of columns of matrix.
      • blockOrder

        public final BlockMatrixLayout.BlockOrder blockOrder
        Whether this block is laid out in row-major (true) or column-major (false) order.
      • numberOfBlocks

        final int numberOfBlocks
        number of blocks in this matrix
      • rowMajor

        private final boolean rowMajor
        See Also:
        blockOrder
      • rows

        public final int rows
        Number of rows of matrix.
      • sqbColThreshold

        private final int sqbColThreshold
        threshold for when to stop using square blocks.
      • sqbRowThreshold

        private final int sqbRowThreshold
        threshold for when to stop using square blocks.
    • Method Detail

      • getBlock

        final double[] getBlock​(BlockDenseDoubleMatrix2D matrix,
                                int row,
                                int column)
        Get the block which contains the specified row, column
        Parameters:
        matrix - to get block from
        row -
        column -
        Returns:
        block containing given row, column
      • getBlockIndexByColumn

        final int getBlockIndexByColumn​(int lrow,
                                        int lcol,
                                        int numRows,
                                        int numCols)
      • getBlockIndexByRow

        final int getBlockIndexByRow​(int lrow,
                                     int lcol,
                                     int numRows,
                                     int numCols)
      • getBlockNumber

        final int getBlockNumber​(int row,
                                 int col)
      • getIndexInBlock

        final int getIndexInBlock​(int row,
                                  int col)
      • getBlockSize

        final int getBlockSize​(int row,
                               int col)
      • toColMajorBlock

        final double[] toColMajorBlock​(double[] block,
                                       int rowStart,
                                       int colStart)
      • getColumnsInBlock

        int getColumnsInBlock​(int col)
      • getRowsInBlock

        int getRowsInBlock​(int row)
      • toRowMajorBlock

        final double[] toRowMajorBlock​(double[] block,
                                       int rowStart,
                                       int colStart)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object