org.apache.sysds.runtime.compress.colgroup.offset

## Class OffsetByte

- java.lang.Object
- - org.apache.sysds.runtime.compress.colgroup.offset.AOffset
  - - org.apache.sysds.runtime.compress.colgroup.offset.OffsetByte

-     public class OffsetByte
      extends AOffset

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OffsetByte(int[] indexes)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getExactSizeOnDisk()` Remember to include the ordinal of the type of offset list.
    `long` | `getInMemorySize()` Get the in memory size of the Offset object
    `static long` | `getInMemorySize(int length)`
    `org.apache.sysds.runtime.compress.colgroup.offset.OffsetByte.IterateByteOffset` | `getIterator()` Get an iterator of the offsets.
    `int` | `getSize()` Get the number of contained elements, This method iterate the entire offset list, so it is not constant lookup.
    `static OffsetByte` | `readFields(DataInput in)`
    `void` | `write(DataOutput out)` Write the offsets to disk.

    - ### Methods inherited from class org.apache.sysds.runtime.compress.colgroup.offset.AOffset

      `getIterator, toString`

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

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

- - ### Constructor Detail

    - #### OffsetByte

          public OffsetByte(int[] indexes)

  - ### Method Detail

    - #### getIterator

          public org.apache.sysds.runtime.compress.colgroup.offset.OffsetByte.IterateByteOffset getIterator()

      Description copied from class: `AOffset`
      Get an iterator of the offsets.
      Specified by:
        `getIterator` in class `AOffset`
      Returns:
        AIterator that iterate through index and dictionary offset values.

    - #### write

          public void write(DataOutput out)
                     throws IOException

      Description copied from class: `AOffset`
      Write the offsets to disk. If you implement another remember to write the ordinal of the new type to disk as well and add it to the OffsetFactory.
      Specified by:
        `write` in class `AOffset`
      Parameters:
        `out` - The output to write to
      Throws:
        `IOException` - Exception that happens if the IO fails to write.

    - #### getInMemorySize

          public long getInMemorySize()

      Description copied from class: `AOffset`
      Get the in memory size of the Offset object
      Specified by:
        `getInMemorySize` in class `AOffset`
      Returns:
        In memory size as a long.

    - #### getExactSizeOnDisk

          public long getExactSizeOnDisk()

      Description copied from class: `AOffset`
      Remember to include the ordinal of the type of offset list.
      Specified by:
        `getExactSizeOnDisk` in class `AOffset`
      Returns:
        the size on disk as a long.

    - #### getSize

          public int getSize()

      Description copied from class: `AOffset`
      Get the number of contained elements, This method iterate the entire offset list, so it is not constant lookup.
      Specified by:
        `getSize` in class `AOffset`
      Returns:
        The number of indexes.

    - #### getInMemorySize

          public static long getInMemorySize(int length)

    - #### readFields

          public static OffsetByte readFields(DataInput in)
                                       throws IOException

      Throws:
        `IOException`

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