Class DecoderComposite
- java.lang.Object
-
- org.apache.sysds.runtime.transform.decode.Decoder
-
- org.apache.sysds.runtime.transform.decode.DecoderComposite
-
- All Implemented Interfaces:
Externalizable
,Serializable
public class DecoderComposite extends Decoder
Simple composite decoder that applies a list of decoders in specified order. By implementing the default decoder API it can be used as a drop-in replacement for any other decoder.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DecoderComposite()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FrameBlock
decode(MatrixBlock in, FrameBlock out)
Block decode API converting a matrix block into a frame block.FrameBlock
decode(MatrixBlock in, FrameBlock out, int k)
Block decode API converting a matrix block into a frame block in parallel.void
decode(MatrixBlock in, FrameBlock out, int rl, int ru)
Block decode row blockvoid
initMetaData(FrameBlock meta)
void
readExternal(ObjectInput in)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.Decoder
subRangeDecoder(int colStart, int colEnd, int dummycodedOffset)
Returns a new Decoder that only handles a sub range of columns.void
updateIndexRanges(long[] beginDims, long[] endDims)
Update index-ranges to after decoding.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.decode.Decoder
getColnames, getSchema, setColnames
-
-
-
-
Method Detail
-
decode
public FrameBlock decode(MatrixBlock in, FrameBlock out)
Description copied from class:Decoder
Block decode API converting a matrix block into a frame block.
-
decode
public FrameBlock decode(MatrixBlock in, FrameBlock out, int k)
Description copied from class:Decoder
Block decode API converting a matrix block into a frame block in parallel.
-
decode
public void decode(MatrixBlock in, FrameBlock out, int rl, int ru)
Description copied from class:Decoder
Block decode row block
-
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 classDecoder
- 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
-
updateIndexRanges
public void updateIndexRanges(long[] beginDims, long[] endDims)
Description copied from class:Decoder
Update index-ranges to after decoding. Note that only Dummycoding changes the ranges.- Overrides:
updateIndexRanges
in classDecoder
- Parameters:
beginDims
- the begin indexes before encodingendDims
- the end indexes before encoding
-
initMetaData
public void initMetaData(FrameBlock meta)
- Specified by:
initMetaData
in classDecoder
-
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 interfaceExternalizable
- Overrides:
writeExternal
in classDecoder
- 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 interfaceExternalizable
- Overrides:
readExternal
in classDecoder
- Parameters:
in
- object input- Throws:
IOException
- if IOException occur
-
-