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

## Class OffsetChar

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

All Implemented Interfaces:
  `Serializable`, `ISliceOffset`

    public class OffsetChar
    extends AOffset
    implements ISliceOffset

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.offset.AOffset

`AOffset.OffsetSliceInfo`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static long` `estimateInMemorySize​(int nOffs)`
`long` `getExactSizeOnDisk()` Remember to include the ordinal of the type of offset list.
`long` `getInMemorySize()` Get the in memory size of the Offset object
`AIterator` `getIterator()` Get an iterator of the offsets while also maintaining the data index pointer.
`int` `getLength()` Get the length of the underlying array.
`AOffsetIterator` `getOffsetIterator()` Get an OffsetIterator of current offsets not maintaining the data index.
`int` `getOffsetToFirst()` Get the offset to the first index
`int` `getOffsetToLast()` Get the offset to the last value
`int` `getSize()` Get the number of contained elements, This method iterate the entire offset list, so it is not constant lookup.
`AOffset` `moveIndex​(int m)` Move the index start x cells
`static OffsetChar` `readFields​(DataInput in)`
`AOffset.OffsetSliceInfo` `slice​(int lowOff, int highOff, int lowValue, int highValue, int low, int high)`
`void` `write​(DataOutput out)` Write the offsets to disk.

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

`append, appendN, cacheIterator, clearSkipList, constructSkipList, equals, equals, getIterator, preAggregateDenseMap, preAggSparseMap, reverse, slice, toString, verify`

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

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

### Method Detail

#### getIterator

    public AIterator getIterator()

Description copied from class: `AOffset`
Get an iterator of the offsets while also maintaining the data index pointer.

Specified by:
  `getIterator` in class `AOffset`
Returns:
  AIterator that iterate through index and dictionary offset values.

#### getOffsetIterator

    public AOffsetIterator getOffsetIterator()

Description copied from class: `AOffset`
Get an OffsetIterator of current offsets not maintaining the data index.

Specified by:
  `getOffsetIterator` in class `AOffset`
Returns:
  AIterator that iterator through the delta offsets.

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

#### estimateInMemorySize

    public static long estimateInMemorySize​(int nOffs)

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

#### getOffsetToFirst

    public int getOffsetToFirst()

Description copied from class: `AOffset`
Get the offset to the first index

Specified by:
  `getOffsetToFirst` in class `AOffset`
Returns:
  The first index offset

#### getOffsetToLast

    public int getOffsetToLast()

Description copied from class: `AOffset`
Get the offset to the last value

Specified by:
  `getOffsetToLast` in class `AOffset`
Returns:
  The last values offset

#### readFields

    public static OffsetChar readFields​(DataInput in)
                                 throws IOException

Throws:
  `IOException`

#### slice

    public AOffset.OffsetSliceInfo slice​(int lowOff,
                                         int highOff,
                                         int lowValue,
                                         int highValue,
                                         int low,
                                         int high)

Specified by:
  `slice` in interface `ISliceOffset`

#### moveIndex

    public AOffset moveIndex​(int m)

Description copied from class: `AOffset`
Move the index start x cells

Specified by:
  `moveIndex` in class `AOffset`
Parameters:
  `m` - The amount to move
Returns:
  The moved index.

#### getLength

    public int getLength()

Description copied from class: `AOffset`
Get the length of the underlying array. This does not reflect the number of contained elements, since some of the elements can be skips.

Specified by:
  `getLength` in class `AOffset`
Returns:
  The length of the underlying arrays