Class BlockMatrixLayout

java.lang.Object
org.ujmp.core.doublematrix.impl.BlockMatrixLayout
All Implemented Interfaces:
Serializable

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

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • 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:
    • 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.
  • Constructor Details

  • Method Details

    • 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(BlockDenseDoubleMatrix2D matrix, int rowStart, int colStart)
    • toColMajorBlock

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

      int getColumnsInBlock(int col)
    • getRowsInBlock

      int getRowsInBlock(int row)
    • toRowMajorBlock

      final double[] toRowMajorBlock(BlockDenseDoubleMatrix2D matrix, int rowStart, int colStart)
    • toRowMajorBlock

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

      public String toString()
      Overrides:
      toString in class Object