Class BlockDenseDoubleMatrix2D

    • Field Detail

      • data

        private double[][] data
        Matrix data by block number.
    • Constructor Detail

      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(double[][] values)
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(double[][] values,
                                        int blockStripeSize,
                                        BlockMatrixLayout.BlockOrder blockOrder)
        Create a block matrix from a jagged array.
        All rows of the values array must have the same length.
        Parameters:
        values - - the data to populate the matrix with.
        blockStripeSize - - length of one side of a block
        blockOrder - - see BlockMatrixLayout.BlockOrder.
        Throws:
        java.lang.NullPointerException - if values is null, or values[0] is null.
        java.lang.ArrayIndexOutOfBoundsException - if any row is shorter than the first row.
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(int rows,
                                        int cols,
                                        int blockStripeSize,
                                        BlockMatrixLayout.BlockOrder blockOrder)
        Create a new matrix with the specified size, and specified block stripe size.
        Parameters:
        rows - - number of rows of the matrix.
        cols - - number of columns of the matrix.
        blockStripeSize - - length of one side of a square block.
        Throws:
        java.lang.IllegalArgumentException - if rows, cols or blockStripeSize are 0 or less, or blockOrder is null.
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(int rows,
                                        int cols,
                                        BlockMatrixLayout.BlockOrder blockOrder)
        Create a new matrix with the given size (rows, cols) and block layout.
        See Also:
        #BlockMatrix(int, int)
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(int rows,
                                        int cols)
        Create a new matrix with the specified size, and specified block stripe size.
        Parameters:
        rows - - number of rows of the matrix.
        cols - - number of columns of the matrix.
        Throws:
        java.lang.IllegalArgumentException - if rows, cols are 0 or less.
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(Matrix m)
        Constructor which takes an existing Matrix to copy data and structure from.
        Block stripe size will be defaulted internally.
        Parameters:
        m - - matrix to copy data from.
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(BlockDenseDoubleMatrix2D m)
        Constructor which takes an existing BlockMatrix to copy data and structure from.
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(Matrix m,
                                        int blockStripeSize)
        Constructor which takes a Matrix and a proposed default block stripe size.
        Parameters:
        m - - matrix containing existing values.
        blockStripeSize - - proposed default block size.
      • BlockDenseDoubleMatrix2D

        public BlockDenseDoubleMatrix2D​(Matrix m,
                                        int blockStripeSize,
                                        BlockMatrixLayout.BlockOrder blockOrder)
        Constructor which takes a Matrix and a proposed default block stripe size.
        Parameters:
        m - - matrix containing existing values.
        blockStripeSize - - proposed default block size.
        blockOrder - row major or column major