Package org.apache.sysds.runtime.compress.plan

# Class NaivePlanEncode

java.lang.Object
org.apache.sysds.runtime.compress.plan.NaivePlanEncode

All Implemented Interfaces:
  `IPlanEncode`

public class NaivePlanEncode extends Object implements IPlanEncode
Naive implementation of encoding based on a plan. This does not reuse plans across groups, and does not smartly extract encodings.

## Constructor Summary

Constructors
Constructor
Description
`NaivePlanEncode(ICLAScheme[] schemes, int k, boolean overlapping)`

## Method Summary

Modifier and Type
Method
Description
`CompressedMatrixBlock`
`encode(MatrixBlock in)`
Encode a given matrix block subject to the plan given, while erroring out in case of breaking compression
`void`
`expandPlan(MatrixBlock in)`
Given a block expand the plan to enable encoding of the given block.
`void`
`expandPlanMultiThread(MatrixBlock in)`
`void`
`expandPlanSingleThread(MatrixBlock in)`
`final String`
`toString()`

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

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

## Constructor Details

### NaivePlanEncode

public NaivePlanEncode(ICLAScheme[] schemes, int k, boolean overlapping)

## Method Details

### encode

public CompressedMatrixBlock encode(MatrixBlock in)
Description copied from interface: `IPlanEncode`
Encode a given matrix block subject to the plan given, while erroring out in case of breaking compression

Specified by:
  `encode` in interface `IPlanEncode`
Parameters:
  `in` - The matrix block to encode
Returns:
  A Compressed Matrix block with the safe scheme applied.

### expandPlan

public void expandPlan(MatrixBlock in)
Description copied from interface: `IPlanEncode`
Given a block expand the plan to enable encoding of the given block.

Specified by:
  `expandPlan` in interface `IPlanEncode`
Parameters:
  `in` - The bock

### expandPlanSingleThread

public void expandPlanSingleThread(MatrixBlock in)

### expandPlanMultiThread

public void expandPlanMultiThread(MatrixBlock in) throws Exception

Throws:
  `Exception`

### toString

public final String toString()

Overrides:
  `toString` in class `Object`