Package org.apache.sysds.runtime.frame.data.columns

## Class ACompressedArray<T>

- java.lang.Object
- - org.apache.sysds.runtime.frame.data.columns.Array<T>
  - - org.apache.sysds.runtime.frame.data.columns.ACompressedArray<T>

All Implemented Interfaces:
  `org.apache.hadoop.io.Writable`

Direct Known Subclasses:
  `DDCArray`

    public abstract class ACompressedArray<T>
    extends Array<T>

A Compressed Array, in general does not allow us to set or modify the array. In all cases of modification it throws an DMLCompressionException.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sysds.runtime.frame.data.columns.Array

`Array.ArrayIterator`

### Field Summary

### Fields inherited from class org.apache.sysds.runtime.frame.data.columns.Array

`ROW_PARALLELIZATION_THRESHOLD`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `append​(String value)` Append a string value to the current Array, this should in general be avoided, and appending larger blocks at a time should be preferred.
`void` `append​(T value)` Append a value of the same type of the Array.
`abstract Array<?>` `changeType​(Types.ValueType t)` Change the allocated array to a different type.
`void` `fill​(String val)` fill the entire array with specific value.
`void` `fill​(T val)` fill the entire array with specific value.
`Object` `get()` Get the underlying array out of the column Group, it is the responsibility of the caller to know what type it is.
`void` `reset​(int size)` Reset the Array and set to a different size.
`void` `set​(int index, double value)` Set index to given double value (cast to the correct type of this array)
`void` `set​(int index, String value)` Set index to the given value of the string parsed.
`void` `set​(int index, T value)` Set index to the given value of same type
`void` `setFromOtherType​(int rl, int ru, Array<?> value)` Set range to given arrays value
`void` `setFromOtherTypeNz​(int rl, int ru, Array<?> value)` Set non default values in the range from the value array given
`void` `setNz​(int rl, int ru, Array<T> value)` Set non default values in the range from the value array given
`abstract ArrayCompressionStatistics` `statistics​(int nSamples)` Get the compression statistics of this array allocation.

### Methods inherited from class org.apache.sysds.runtime.frame.data.columns.Array

`analyzeValueType, analyzeValueType, append, baseMemoryCost, changeType, changeType, changeType, changeTypeWithNulls, changeTypeWithNulls, changeTypeWithNulls, clone, containsNull, equals, equals, extractDouble, findEmpty, findEmptyInverse, get, getAsByteArray, getAsDouble, getAsNaNDouble, getCache, getExactSerializedSize, getFrameArrayType, getInMemorySize, getInternal, getIterator, getMinMaxLength, getNulls, getRecodeMap, getRecodeMap, getRecodeMap, getValueType, hashDouble, isEmpty, isNotEmpty, isShallowSerialize, minMax, minMax, possiblyContainsNaN, select, select, set, set, setCache, setFromOtherTypeNz, setM, setM, setNz, size, slice, toString`

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

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

### Methods inherited from interface org.apache.hadoop.io.Writable

`readFields, write`

### Method Detail

#### get

    public Object get()

Description copied from class: `Array`
Get the underlying array out of the column Group, it is the responsibility of the caller to know what type it is. Also it is not guaranteed that the underlying data structure does not allocate an appropriate response to the caller. This in practice means that if called there is a possibility that the entire array is allocated again. So the method should only be used for debugging purposes not for performance.

Specified by:
  `get` in class `Array<T>`
Returns:
  The underlying array.

#### set

    public void set​(int index,
                    T value)

Description copied from class: `Array`
Set index to the given value of same type

Specified by:
  `set` in class `Array<T>`
Parameters:
  `index` - The index to set
  `value` - The value to assign

#### set

    public void set​(int index,
                    double value)

Description copied from class: `Array`
Set index to given double value (cast to the correct type of this array)

Specified by:
  `set` in class `Array<T>`
Parameters:
  `index` - the index to set
  `value` - the value to set it to (before casting to correct value type)

#### set

    public void set​(int index,
                    String value)

Description copied from class: `Array`
Set index to the given value of the string parsed.

Specified by:
  `set` in class `Array<T>`
Parameters:
  `index` - The index to set
  `value` - The value to assign

#### setFromOtherType

    public void setFromOtherType​(int rl,
                                 int ru,
                                 Array<?> value)

Description copied from class: `Array`
Set range to given arrays value

Specified by:
  `setFromOtherType` in class `Array<T>`
Parameters:
  `rl` - row lower
  `ru` - row upper (inclusive)
  `value` - value array to take values from (other type)

#### setNz

    public void setNz​(int rl,
                      int ru,
                      Array<T> value)

Description copied from class: `Array`
Set non default values in the range from the value array given

Specified by:
  `setNz` in class `Array<T>`
Parameters:
  `rl` - row start
  `ru` - row upper inclusive
  `value` - value array of same type

#### setFromOtherTypeNz

    public void setFromOtherTypeNz​(int rl,
                                   int ru,
                                   Array<?> value)

Description copied from class: `Array`
Set non default values in the range from the value array given

Specified by:
  `setFromOtherTypeNz` in class `Array<T>`
Parameters:
  `rl` - row start
  `ru` - row end inclusive
  `value` - value array of different type

#### append

    public void append​(String value)

Description copied from class: `Array`
Append a string value to the current Array, this should in general be avoided, and appending larger blocks at a time should be preferred.

Specified by:
  `append` in class `Array<T>`
Parameters:
  `value` - The value to append

#### append

    public void append​(T value)

Description copied from class: `Array`
Append a value of the same type of the Array. This should in general be avoided, and appending larger blocks at a time should be preferred.

Specified by:
  `append` in class `Array<T>`
Parameters:
  `value` - The value to append

#### fill

    public void fill​(String val)

Description copied from class: `Array`
fill the entire array with specific value.

Specified by:
  `fill` in class `Array<T>`
Parameters:
  `val` - the value to fill with.

#### fill

    public void fill​(T val)

Description copied from class: `Array`
fill the entire array with specific value.

Specified by:
  `fill` in class `Array<T>`
Parameters:
  `val` - the value to fill with.

#### reset

    public void reset​(int size)

Description copied from class: `Array`
Reset the Array and set to a different size. This method is used to reuse an already allocated Array, without extra allocation. It should only be done in cases where the Array is no longer in use in any FrameBlocks.

Specified by:
  `reset` in class `Array<T>`
Parameters:
  `size` - The size to reallocate into.

#### statistics

    public abstract ArrayCompressionStatistics statistics​(int nSamples)

Description copied from class: `Array`
Get the compression statistics of this array allocation.

Overrides:
  `statistics` in class `Array<T>`
Parameters:
  `nSamples` - The number of sample elements suggested (not forced) to be used.
Returns:
  The compression statistics of this array.

#### changeType

    public abstract Array<?> changeType​(Types.ValueType t)

Description copied from class: `Array`
Change the allocated array to a different type. If the type is the same a deep copy is returned for safety.

Overrides:
  `changeType` in class `Array<T>`
Parameters:
  `t` - The type to change to
Returns:
  A new column array.