Class DenseBlockFP64DEDUP

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int blockSize​(int bix)
      Get the number of rows of the given block.
      long capacity()
      Get the total length of allocated blocks.
      long countNonZeros()
      Compute the number of non-zero values, which potentially makes a full pass over the underlying blocks.
      int countNonZeros​(int r)
      Compute the number of non-zero values for the given row, which potentially makes a full pass over the underlying row.
      long countNonZeros​(int rl, int ru, int ol, int ou)
      Compute the number of non-zero values, which potentially makes a full pass over the underlying blocks in the row range.
      long estimateMemory()  
      static long estimateMemory​(int rows, int cols, int duplicates)  
      static long estimateMemory​(long rows, long cols, long duplicates)  
      double get​(int[] ix)
      Get the value of a given cell
      double get​(int r, int c)
      Get the value for a given row and column.
      long getLong​(int[] ix)
      Get the value of a given cell as long
      int getNrDistinctRows()  
      String getString​(int[] ix)
      Get the value of a given cell as a String
      void incr​(int r, int c)
      Increments the given value for a given row and column.
      void incr​(int r, int c, double delta)
      Increments the given value for a given row and column by delta.
      int index​(int r)
      Get the block index for a given row.
      boolean isContiguous()
      Indicates if the dense block has a single underlying block, i.e., if numBlocks==1.
      boolean isContiguous​(int rl, int ru)
      Indicates if the dense block has a single underlying block for the given row range.
      boolean isNumeric()
      Indicates if the dense block is numeric.
      boolean isNumeric​(Types.ValueType vt)
      Indicates if the dense block is a specific numeric value type.
      int numBlocks()
      Get the number of allocated blocks.
      int pos​(int r)
      Get the position for a given row within its associated block.
      int pos​(int[] ix)
      Get the position for a given cell within the associated block.
      int pos​(int r, int c)
      Get the position for a given row and column within the associated block.
      void reset​(int rlen, int[] odims, double v)
      Resets the dense block by setting the given value.
      void resetNoFill​(int rlen, int[] odims)  
      DenseBlock set​(int[] ix, double v)
      Set the specified cell to the given value.
      DenseBlock set​(int[] ix, long v)
      Set the specified cell to the given value.
      DenseBlock set​(int[] ix, String v)
      Set the specified cell to the given value.
      DenseBlock set​(int r, double[] v)
      Copy the given vector into the given row.
      DenseBlock set​(int r, int c, double v)
      Set the given value for a given row and column.
      DenseBlock set​(int rl, int ru, int ol, int ou, DenseBlock db)
      Copy the given dense block into the specified index range.
      DenseBlock set​(DenseBlock db)
      Copy the given dense block.
      void setDistinct​(int d)  
      int size​(int bix)
      Get the length of the given block.
      double[] values​(int r)
      Get the allocated block for the given row.
      double[] valuesAt​(int bix)
      Get an allocated block.
    • Method Detail

      • setDistinct

        public void setDistinct​(int d)
      • getNrDistinctRows

        public int getNrDistinctRows()
      • reset

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

        public void resetNoFill​(int rlen,
                                int[] odims)
        Specified by:
        resetNoFill in class DenseBlock
      • isNumeric

        public boolean isNumeric()
        Description copied from class: DenseBlock
        Indicates if the dense block is numeric.
        Specified by:
        isNumeric in class DenseBlock
        Returns:
        true if numeric (FP, INT, BOOLEAN)
      • isNumeric

        public boolean isNumeric​(Types.ValueType vt)
        Description copied from class: DenseBlock
        Indicates if the dense block is a specific numeric value type.
        Specified by:
        isNumeric in class DenseBlock
        Parameters:
        vt - value type to check
        Returns:
        true if numeric and of value type vt
      • capacity

        public long capacity()
        Description copied from class: DenseBlock
        Get the total length of allocated blocks.
        Specified by:
        capacity in class DenseBlock
        Returns:
        capacity
      • 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.
        Overrides:
        countNonZeros in class DenseBlockDRB
        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.
        Overrides:
        countNonZeros in class DenseBlockDRB
        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.
        Overrides:
        countNonZeros in class DenseBlockDRB
        Parameters:
        rl - row lower index
        ru - row upper index (exclusive)
        ol - column lower index
        ou - column upper index (exclusive)
        Returns:
        number of non-zeros
      • pos

        public int pos​(int r)
        Description copied from class: DenseBlock
        Get the position for a given row within its associated block.
        Overrides:
        pos in class DenseBlockDRB
        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.
        Overrides:
        pos in class DenseBlockDRB
        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.
        Overrides:
        pos in class DenseBlockDRB
        Parameters:
        ix - cell indexes
        Returns:
        block position
      • blockSize

        public int blockSize​(int bix)
        Description copied from class: DenseBlock
        Get the number of rows of the given block.
        Overrides:
        blockSize in class DenseBlockDRB
        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.
        Overrides:
        isContiguous in class DenseBlockDRB
        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.
        Overrides:
        isContiguous in class DenseBlockDRB
        Parameters:
        rl - row lower index
        ru - row upper index (inclusive)
        Returns:
        true if single block in row range
      • values

        public double[] values​(int r)
        Description copied from class: DenseBlock
        Get the allocated block for the given row. This call is equivalent to valuesAt(indexes(r)).
        Specified by:
        values in class DenseBlock
        Parameters:
        r - row index
        Returns:
        block
      • valuesAt

        public double[] valuesAt​(int bix)
        Description copied from class: DenseBlock
        Get an allocated block.
        Specified by:
        valuesAt in class DenseBlock
        Parameters:
        bix - block index
        Returns:
        block
      • index

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

        public int numBlocks()
        Description copied from class: DenseBlock
        Get the number of allocated blocks.
        Overrides:
        numBlocks in class DenseBlockDRB
        Returns:
        number of blocks
      • size

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

        public void incr​(int r,
                         int c)
        Description copied from class: DenseBlock
        Increments the given value for a given row and column.
        Specified by:
        incr in class DenseBlock
        Parameters:
        r - row index
        c - column index
      • incr

        public void incr​(int r,
                         int c,
                         double delta)
        Description copied from class: DenseBlock
        Increments the given value for a given row and column by delta.
        Specified by:
        incr in class DenseBlock
        Parameters:
        r - row index
        c - column index
        delta - increment value
      • set

        public DenseBlock set​(int r,
                              int c,
                              double v)
        Description copied from class: DenseBlock
        Set the given value for a given row and column.
        Specified by:
        set in class DenseBlock
        Parameters:
        r - row index
        c - column index
        v - value
        Returns:
        self
      • set

        public DenseBlock set​(int r,
                              double[] v)
        Description copied from class: DenseBlock
        Copy the given vector into the given row.
        Specified by:
        set in class DenseBlock
        Parameters:
        r - row index
        v - value vector
        Returns:
        self
      • set

        public DenseBlock set​(int rl,
                              int ru,
                              int ol,
                              int ou,
                              DenseBlock db)
        Description copied from class: DenseBlock
        Copy the given dense block into the specified index range.
        Overrides:
        set in class DenseBlock
        Parameters:
        rl - row lower index
        ru - row upper index (exclusive)
        ol - column lower index
        ou - column upper index (exclusive)
        db - dense block
        Returns:
        self
      • set

        public DenseBlock set​(int[] ix,
                              double v)
        Description copied from class: DenseBlock
        Set the specified cell to the given value.
        Specified by:
        set in class DenseBlock
        Parameters:
        ix - cell indexes
        v - value
        Returns:
        self
      • set

        public DenseBlock set​(int[] ix,
                              long v)
        Description copied from class: DenseBlock
        Set the specified cell to the given value.
        Specified by:
        set in class DenseBlock
        Parameters:
        ix - cell indexes
        v - value
        Returns:
        self
      • set

        public DenseBlock set​(int[] ix,
                              String v)
        Description copied from class: DenseBlock
        Set the specified cell to the given value.
        Specified by:
        set in class DenseBlock
        Parameters:
        ix - cell indexes
        v - value as String
        Returns:
        self
      • get

        public double get​(int r,
                          int c)
        Description copied from class: DenseBlock
        Get the value for a given row and column.
        Specified by:
        get in interface Block
        Specified by:
        get in class DenseBlock
        Parameters:
        r - row index
        c - column index
        Returns:
        value
      • get

        public double get​(int[] ix)
        Description copied from class: DenseBlock
        Get the value of a given cell
        Specified by:
        get in class DenseBlock
        Parameters:
        ix - cell indexes
        Returns:
        value
      • getString

        public String getString​(int[] ix)
        Description copied from class: DenseBlock
        Get the value of a given cell as a String
        Specified by:
        getString in class DenseBlock
        Parameters:
        ix - cell indexes
        Returns:
        value as String
      • getLong

        public long getLong​(int[] ix)
        Description copied from class: DenseBlock
        Get the value of a given cell as long
        Specified by:
        getLong in class DenseBlock
        Parameters:
        ix - cell indexes
        Returns:
        value as long
      • estimateMemory

        public long estimateMemory()
      • estimateMemory

        public static long estimateMemory​(int rows,
                                          int cols,
                                          int duplicates)
      • estimateMemory

        public static long estimateMemory​(long rows,
                                          long cols,
                                          long duplicates)