Class DecoderBin

java.lang.Object
org.apache.sysds.runtime.transform.decode.Decoder
org.apache.sysds.runtime.transform.decode.DecoderBin
All Implemented Interfaces:
Externalizable, Serializable

public class DecoderBin extends Decoder
Simple atomic decoder for binned columns. This decoder builds internally arrays of lower/upper bin boundaries, accesses these boundaries in constant time for incoming values and
See Also:
  • Constructor Details

    • DecoderBin

      public DecoderBin()
  • Method Details

    • decode

      public FrameBlock decode(MatrixBlock in, FrameBlock out)
      Description copied from class: Decoder
      Block decode API converting a matrix block into a frame block.
      Specified by:
      decode in class Decoder
      Parameters:
      in - Input matrix block
      out - Output frame block
      Returns:
      returns given output frame block for convenience
    • decode

      public void decode(MatrixBlock in, FrameBlock out, int rl, int ru)
      Description copied from class: Decoder
      Block decode row block
      Specified by:
      decode in class Decoder
      Parameters:
      in - input Matrix Block
      out - output FrameBlock
      rl - row start to decode
      ru - row end to decode (not inclusive)
    • subRangeDecoder

      public Decoder subRangeDecoder(int colStart, int colEnd, int dummycodedOffset)
      Description copied from class: Decoder
      Returns a new Decoder that only handles a sub range of columns. The sub-range refers to the columns after decoding.
      Overrides:
      subRangeDecoder in class Decoder
      Parameters:
      colStart - the start index of the sub-range (1-based, inclusive)
      colEnd - the end index of the sub-range (1-based, exclusive)
      dummycodedOffset - the offset of dummycoded segments before colStart
      Returns:
      a decoder of the same type, just for the sub-range
    • initMetaData

      public void initMetaData(FrameBlock meta)
      Specified by:
      initMetaData in class Decoder
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Description copied from class: Decoder
      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 Decoder
      Parameters:
      out - object output
      Throws:
      IOException - if IOException occurs
    • readExternal

      public void readExternal(ObjectInput in) throws IOException
      Description copied from class: Decoder
      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 Decoder
      Parameters:
      in - object input
      Throws:
      IOException - if IOException occur