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

# Class ACLAScheme

java.lang.Object
org.apache.sysds.runtime.compress.colgroup.scheme.ACLAScheme

All Implemented Interfaces:
  `Cloneable`, `ICLAScheme`

Direct Known Subclasses:
  `ConstScheme`, `DDCScheme`, `EmptyScheme`, `RLEScheme`, `SDCScheme`, `UncompressedScheme`

public abstract class ACLAScheme extends Object implements ICLAScheme

## Field Summary

### Fields inherited from interface org.apache.sysds.runtime.compress.colgroup.scheme.ICLAScheme

`LOG`

## Method Summary

Modifier and Type
Method
Description
`abstract ACLAScheme`
`clone()`
`final AColGroup`
`encode(MatrixBlock data)`
Encode the given matrix block into the scheme provided in the instance.
`final AColGroup`
`encode(MatrixBlock data, IColIndex columns)`
Encode a given matrix block into the scheme provided in the instance but overwrite what columns to use.
`final AColGroup`
`encodeT(MatrixBlock data)`
Encode the given matrix block into the scheme provided in the instance, the input data is transposed The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown.
`final AColGroup`
`encodeT(MatrixBlock data, IColIndex columns)`
Encode a given matrix block into the scheme provided in the instance but overwrite what columns to use.
`final ICLAScheme`
`update(MatrixBlock data)`
Update the encoding scheme to enable compression of the given data.
`final ICLAScheme`
`update(MatrixBlock data, IColIndex columns)`
Update the encoding scheme to enable compression of the given data.
`final Pair<ICLAScheme,AColGroup>`
`updateAndEncode(MatrixBlock data)`
Update and encode the given block in a single pass.
`final Pair<ICLAScheme,AColGroup>`
`updateAndEncode(MatrixBlock data, IColIndex columns)`
Try to update and encode in a single pass over the data.
`final Pair<ICLAScheme,AColGroup>`
`updateAndEncodeT(MatrixBlock data)`
Update and encode the given block in a single pass.
`final Pair<ICLAScheme,AColGroup>`
`updateAndEncodeT(MatrixBlock data, IColIndex columns)`
Try to update and encode in a single pass over the data.
`final ICLAScheme`
`updateT(MatrixBlock data)`
Update the encoding scheme to enable compression of the given data.
`final ICLAScheme`
`updateT(MatrixBlock data, IColIndex columns)`
Update the encoding scheme to enable compression of the given data.

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

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

## Method Details

### encode

public final AColGroup encode(MatrixBlock data)
Description copied from interface: `ICLAScheme`
Encode the given matrix block into the scheme provided in the instance. The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.

Specified by:
  `encode` in interface `ICLAScheme`
Parameters:
  `data` - The data to encode
Returns:
  A compressed column group forced to use the scheme provided.

### encode

public final AColGroup encode(MatrixBlock data, IColIndex columns)
Description copied from interface: `ICLAScheme`
Encode a given matrix block into the scheme provided in the instance but overwrite what columns to use. The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.

Specified by:
  `encode` in interface `ICLAScheme`
Parameters:
  `data` - The data to encode
  `columns` - The columns to apply the scheme to, but must be of same number than the encoded scheme
Returns:
  A compressed column group forced to use the scheme provided.

### encodeT

public final AColGroup encodeT(MatrixBlock data)
Description copied from interface: `ICLAScheme`
Encode the given matrix block into the scheme provided in the instance, the input data is transposed The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.

Specified by:
  `encodeT` in interface `ICLAScheme`
Parameters:
  `data` - The transposed data to encode
Returns:
  A compressed column group forced to use the scheme provided.

### encodeT

public final AColGroup encodeT(MatrixBlock data, IColIndex columns)
Description copied from interface: `ICLAScheme`
Encode a given matrix block into the scheme provided in the instance but overwrite what columns to use. The method is unsafe in the sense that if the encoding scheme does not fit, there is no guarantee that an error is thrown. To guarantee the encoding scheme, first use update on the matrix block and used the returned scheme to ensure consistency.

Specified by:
  `encodeT` in interface `ICLAScheme`
Parameters:
  `data` - The transposed data to encode
  `columns` - The columns to apply the scheme to, but must be of same number than the encoded scheme
Returns:
  A compressed column group forced to use the scheme provided.

### update

public final ICLAScheme update(MatrixBlock data)
Description copied from interface: `ICLAScheme`
Update the encoding scheme to enable compression of the given data.

Specified by:
  `update` in interface `ICLAScheme`
Parameters:
  `data` - The data to update into the scheme
Returns:
  A updated scheme

### update

public final ICLAScheme update(MatrixBlock data, IColIndex columns)
Description copied from interface: `ICLAScheme`
Update the encoding scheme to enable compression of the given data.

Specified by:
  `update` in interface `ICLAScheme`
Parameters:
  `data` - The data to update into the scheme
  `columns` - The columns to extract the data from
Returns:
  A updated scheme

### updateT

public final ICLAScheme updateT(MatrixBlock data)
Description copied from interface: `ICLAScheme`
Update the encoding scheme to enable compression of the given data.

Specified by:
  `updateT` in interface `ICLAScheme`
Parameters:
  `data` - The transposed data to update into the scheme
Returns:
  A updated scheme

### updateT

public final ICLAScheme updateT(MatrixBlock data, IColIndex columns)
Description copied from interface: `ICLAScheme`
Update the encoding scheme to enable compression of the given data.

Specified by:
  `updateT` in interface `ICLAScheme`
Parameters:
  `data` - The transposed data to update into the scheme
  `columns` - The columns to extract the data from
Returns:
  A updated scheme

### updateAndEncode

public final Pair<ICLAScheme,AColGroup> updateAndEncode(MatrixBlock data)
Description copied from interface: `ICLAScheme`
Update and encode the given block in a single pass. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.

Specified by:
  `updateAndEncode` in interface `ICLAScheme`
Parameters:
  `data` - The block to encode
Returns:
  The updated scheme and an encoded column group

### updateAndEncodeT

public final Pair<ICLAScheme,AColGroup> updateAndEncodeT(MatrixBlock data)
Description copied from interface: `ICLAScheme`
Update and encode the given block in a single pass. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.

Specified by:
  `updateAndEncodeT` in interface `ICLAScheme`
Parameters:
  `data` - The transposed block to encode
Returns:
  The updated scheme and an encoded column group

### updateAndEncode

public final Pair<ICLAScheme,AColGroup> updateAndEncode(MatrixBlock data, IColIndex columns)
Description copied from interface: `ICLAScheme`
Try to update and encode in a single pass over the data. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.

Specified by:
  `updateAndEncode` in interface `ICLAScheme`
Parameters:
  `data` - The block to encode
  `columns` - The column to encode
Returns:
  The updated scheme and an encoded column group

### updateAndEncodeT

public final Pair<ICLAScheme,AColGroup> updateAndEncodeT(MatrixBlock data, IColIndex columns)
Description copied from interface: `ICLAScheme`
Try to update and encode in a single pass over the data. It can fail to do so in cases where the dictionary size increase over the mapping sizes supported by individual encodings. The implementation should always work and fall back to a normal two pass algorithm if it breaks.

Specified by:
  `updateAndEncodeT` in interface `ICLAScheme`
Parameters:
  `data` - The transposed block to encode
  `columns` - The column to encode
Returns:
  The updated scheme and an encoded column group

### clone

public abstract ACLAScheme clone()

Specified by:
  `clone` in interface `ICLAScheme`