Class DenseBlockDRB

    • Method Detail

      • reset

        public void reset​(int rlen,
                          int[] odims,
                          double v)
        Description copied from class: DenseBlock
        Resets the dense block by setting the given value.
        Specified by:
        reset in class DenseBlock
        Parameters:
        rlen - number of rows
        odims - other dimensions
        v - value
      • numBlocks

        public int numBlocks()
        Description copied from class: DenseBlock
        Get the number of allocated blocks.
        Specified by:
        numBlocks in class DenseBlock
        Returns:
        number of blocks
      • blockSize

        public int blockSize()
        Description copied from class: DenseBlock
        Get the number of rows per block, except last one.
        Specified by:
        blockSize in class DenseBlock
        Returns:
        number of rows in block
      • blockSize

        public int blockSize​(int bix)
        Description copied from class: DenseBlock
        Get the number of rows of the given block.
        Specified by:
        blockSize in class DenseBlock
        Parameters:
        bix - block index
        Returns:
        number of rows in block
      • isContiguous

        public boolean isContiguous()
        Description copied from class: DenseBlock
        Indicates if the dense block has a single underlying block, i.e., if numBlocks==1.
        Specified by:
        isContiguous in class DenseBlock
        Returns:
        true if single block
      • isContiguous

        public boolean isContiguous​(int rl,
                                    int ru)
        Description copied from class: DenseBlock
        Indicates if the dense block has a single underlying block for the given row range.
        Specified by:
        isContiguous in class DenseBlock
        Parameters:
        rl - row lower index
        ru - row upper index (inclusive)
        Returns:
        true if single block in row range
      • size

        public int size​(int bix)
        Description copied from class: DenseBlock
        Get the length of the given block.
        Specified by:
        size in class DenseBlock
        Parameters:
        bix - block index
        Returns:
        length
      • pos

        public int pos​(int r)
        Description copied from class: DenseBlock
        Get the position for a given row within its associated block.
        Specified by:
        pos in class DenseBlock
        Parameters:
        r - row index
        Returns:
        block position
      • pos

        public int pos​(int r,
                       int c)
        Description copied from class: DenseBlock
        Get the position for a given row and column within the associated block.
        Specified by:
        pos in class DenseBlock
        Parameters:
        r - row index
        c - column index
        Returns:
        block position
      • pos

        public int pos​(int[] ix)
        Description copied from class: DenseBlock
        Get the position for a given cell within the associated block.
        Specified by:
        pos in class DenseBlock
        Parameters:
        ix - cell indexes
        Returns:
        block position
      • countNonZeros

        public long countNonZeros()
        Description copied from class: DenseBlock
        Compute the number of non-zero values, which potentially makes a full pass over the underlying blocks.
        Specified by:
        countNonZeros in class DenseBlock
        Returns:
        number of non-zeros
      • countNonZeros

        public int countNonZeros​(int r)
        Description copied from class: DenseBlock
        Compute the number of non-zero values for the given row, which potentially makes a full pass over the underlying row.
        Specified by:
        countNonZeros in class DenseBlock
        Parameters:
        r - row index
        Returns:
        number of non-zeros
      • countNonZeros

        public long countNonZeros​(int rl,
                                  int ru,
                                  int ol,
                                  int ou)
        Description copied from class: DenseBlock
        Compute the number of non-zero values, which potentially makes a full pass over the underlying blocks in the row range.
        Specified by:
        countNonZeros in class DenseBlock
        Parameters:
        rl - row lower index
        ru - row upper index (exclusive)
        ol - column lower index
        ou - column upper index (exclusive)
        Returns:
        number of non-zeros
      • set

        public DenseBlock set​(int rl,
                              int ru,
                              int cl,
                              int cu,
                              double v)
        Description copied from class: DenseBlock
        Set the given value for an entire index range of the dense block (fill).
        Specified by:
        set in class DenseBlock
        Parameters:
        rl - row lower index
        ru - row upper index (exclusive)
        cl - column lower index
        cu - column upper index (exclusive)
        v - value
        Returns:
        self
      • set

        public DenseBlock set​(double v)
        Description copied from class: DenseBlock
        Set the given value for the entire dense block (fill).
        Specified by:
        set in class DenseBlock
        Parameters:
        v - value
        Returns:
        self