org.apache.sysds.runtime.transform.encode

## Class EncoderOmit

- java.lang.Object
- - org.apache.sysds.runtime.transform.encode.LegacyEncoder
  - - org.apache.sysds.runtime.transform.encode.EncoderOmit

- All Implemented Interfaces:
    Externalizable, Serializable

      public class EncoderOmit
      extends LegacyEncoder

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncoderOmit()`
    `EncoderOmit(boolean federated)`
    `EncoderOmit(int[] colList, int clen)`
    `EncoderOmit(org.apache.wink.json4j.JSONObject parsedSpec, String[] colnames, int clen, int minCol, int maxCol)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MatrixBlock` | `apply(FrameBlock in, MatrixBlock out)` Encode input data blockwise according to existing transform meta data (transform apply).
    `void` | `build(FrameBlock in)` Build the transform meta data for the given block input.
    `MatrixBlock` | `encode(FrameBlock in, MatrixBlock out)` Block encode: build and apply (transform encode).
    `boolean` | `equals(Object o)`
    `FrameBlock` | `getMetaData(FrameBlock out)` Construct a frame block out of the transform meta data.
    `int` | `getNumRemovedRows()`
    `int` | `getNumRemovedRows(boolean[] rmRows)`
    `int` | `hashCode()`
    `int` | `initColList(int[] colList)`
    `void` | `initMetaData(FrameBlock meta)` Sets up the required meta data for a subsequent call to apply.
    `boolean` | `isApplicable()` Indicates if this encoder is applicable, i.e, if there is at least one column to encode.
    `void` | `mergeAt(EncoderOmit other, int row, int col)`
    `boolean` | `omit(String[] words, TfUtils agents)`
    `void` | `readExternal(ObjectInput in)` Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.
    `EncoderOmit` | `subRangeEncoder(IndexRange ixRange)` Returns a new Encoder that only handles a sub range of columns.
    `void` | `updateIndexRanges(long[] beginDims, long[] endDims)` Update index-ranges to after encoding.
    `void` | `writeExternal(ObjectOutput out)` Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.

    - ### Methods inherited from class org.apache.sysds.runtime.transform.encode.LegacyEncoder

      `buildPartial, getColList, getColMapping, initColList, isApplicable, mergeAt, prepareBuildPartial, setColList, shiftCols`

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

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncoderOmit

          public EncoderOmit(org.apache.wink.json4j.JSONObject parsedSpec,
                             String[] colnames,
                             int clen,
                             int minCol,
                             int maxCol)
                      throws org.apache.wink.json4j.JSONException

      Throws:
        `org.apache.wink.json4j.JSONException`

    - #### EncoderOmit

          public EncoderOmit()

    - #### EncoderOmit

          public EncoderOmit(int[] colList,
                             int clen)

    - #### EncoderOmit

          public EncoderOmit(boolean federated)

  - ### Method Detail

    - #### initColList

          public int initColList(int[] colList)

      Overrides:
        `initColList` in class `LegacyEncoder`

    - #### isApplicable

          public boolean isApplicable()

      Indicates if this encoder is applicable, i.e, if there is at least one column to encode.
      Overrides:
        `isApplicable` in class `LegacyEncoder`
      Returns:
        true if at least one column to encode

    - #### getNumRemovedRows

          public int getNumRemovedRows(boolean[] rmRows)

    - #### getNumRemovedRows

          public int getNumRemovedRows()

    - #### omit

          public boolean omit(String[] words,
                              TfUtils agents)

    - #### encode

          public MatrixBlock encode(FrameBlock in,
                                    MatrixBlock out)

      Description copied from class: `LegacyEncoder`
      Block encode: build and apply (transform encode).
      Specified by:
        `encode` in class `LegacyEncoder`
      Parameters:
        `in` - input frame block
        `out` - output matrix block
      Returns:
        output matrix block

    - #### build

          public void build(FrameBlock in)

      Description copied from class: `LegacyEncoder`
      Build the transform meta data for the given block input. This call modifies and keeps meta data as encoder state.
      Specified by:
        `build` in class `LegacyEncoder`
      Parameters:
        `in` - input frame block

    - #### apply

          public MatrixBlock apply(FrameBlock in,
                                   MatrixBlock out)

      Description copied from class: `LegacyEncoder`
      Encode input data blockwise according to existing transform meta data (transform apply).
      Specified by:
        `apply` in class `LegacyEncoder`
      Parameters:
        `in` - input frame block
        `out` - output matrix block
      Returns:
        output matrix block

    - #### subRangeEncoder

          public EncoderOmit subRangeEncoder(IndexRange ixRange)

      Description copied from class: `LegacyEncoder`
      Returns a new Encoder that only handles a sub range of columns.
      Overrides:
        `subRangeEncoder` in class `LegacyEncoder`
      Parameters:
        `ixRange` - the range (1-based, begin inclusive, end exclusive)
      Returns:
        an encoder of the same type, just for the sub-range

    - #### mergeAt

          public void mergeAt(EncoderOmit other,
                              int row,
                              int col)

    - #### updateIndexRanges

          public void updateIndexRanges(long[] beginDims,
                                        long[] endDims)

      Description copied from class: `LegacyEncoder`
      Update index-ranges to after encoding. Note that only Dummycoding changes the ranges.
      Overrides:
        `updateIndexRanges` in class `LegacyEncoder`
      Parameters:
        `beginDims` - begin dimensions of range
        `endDims` - end dimensions of range

    - #### getMetaData

          public FrameBlock getMetaData(FrameBlock out)

      Description copied from class: `LegacyEncoder`
      Construct a frame block out of the transform meta data.
      Specified by:
        `getMetaData` in class `LegacyEncoder`
      Parameters:
        `out` - output frame block
      Returns:
        output frame block?

    - #### initMetaData

          public void initMetaData(FrameBlock meta)

      Description copied from class: `LegacyEncoder`
      Sets up the required meta data for a subsequent call to apply.
      Specified by:
        `initMetaData` in class `LegacyEncoder`
      Parameters:
        `meta` - frame block

    - #### writeExternal

          public void writeExternal(ObjectOutput out)
                             throws IOException

      Description copied from class: `LegacyEncoder`
      Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.
      Specified by:
        `writeExternal` in interface `Externalizable`
      Overrides:
        `writeExternal` in class `LegacyEncoder`
      Parameters:
        `out` - object output
      Throws:
        `IOException` - if IOException occurs

    - #### readExternal

          public void readExternal(ObjectInput in)
                            throws IOException

      Description copied from class: `LegacyEncoder`
      Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.
      Specified by:
        `readExternal` in interface `Externalizable`
      Overrides:
        `readExternal` in class `LegacyEncoder`
      Parameters:
        `in` - object input
      Throws:
        `IOException` - if IOException occur

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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