org.apache.sysds.runtime.data

## Class DenseBlockLString

- java.lang.Object
- - org.apache.sysds.runtime.data.DenseBlock
  - - org.apache.sysds.runtime.data.DenseBlockLDRB
    - - org.apache.sysds.runtime.data.DenseBlockLString

- All Implemented Interfaces:
    Serializable

      public class DenseBlockLString
      extends DenseBlockLDRB

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.sysds.runtime.data.DenseBlock

      `DenseBlock.Type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DenseBlockLString(int[] dims)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `capacity()` Get the total length of allocated blocks.
    `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
    `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.
    `boolean` | `isContiguous()` Indicates if the dense block has a single underlying block, i.e., if numBlocks==1.
    `boolean` | `isNumeric()` Indicates if the dense block is numeric.
    `int` | `numBlocks()` Get the number of allocated blocks.
    `DenseBlock` | `set(DenseBlock db)` Copy the given dense block.
    `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, int c, double v)` Set the given value for a given row and column.
    `DenseBlock` | `set(String s)` Set the given string for the entire dense block (fill).
    `double[]` | `values(int r)` Get the allocated block for the given row.
    `double[]` | `valuesAt(int bix)` Get an allocated block.

    - ### Methods inherited from class org.apache.sysds.runtime.data.DenseBlockLDRB

      `blockSize, blockSize, countNonZeros, countNonZeros, countNonZeros, index, isContiguous, pos, pos, pos, reset, set, set, set, size`

    - ### Methods inherited from class org.apache.sysds.runtime.data.DenseBlock

      `estimateMemory, getCumODims, getDim, getNextIndexes, numDims, numRows, reset, reset, reset, reset, reset, reset, set, set, set, setDims, size, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DenseBlockLString

          public DenseBlockLString(int[] dims)

  - ### Method Detail

    - #### 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)

    - #### 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

    - #### 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

    - #### capacity

          public long capacity()

      Description copied from class: `DenseBlock`
      Get the total length of allocated blocks.
      Specified by:
        `capacity` in class `DenseBlock`
      Returns:
        capacity

    - #### 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

    - #### 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(String s)

      Description copied from class: `DenseBlock`
      Set the given string for the entire dense block (fill). Generally the string will be parsed, except for string DenseBlock.
      Overrides:
        `set` in class `DenseBlock`
      Parameters:
        `s` - string
      Returns:
        self

    - #### 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(DenseBlock db)

      Description copied from class: `DenseBlock`
      Copy the given dense block.
      Overrides:
        `set` in class `DenseBlockLDRB`
      Parameters:
        `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 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

Copyright © 2021 The Apache Software Foundation. All rights reserved.