Class Decoder
java.lang.Object
org.apache.sysds.runtime.transform.decode.Decoder
- All Implemented Interfaces:
Externalizable,Serializable
- Direct Known Subclasses:
DecoderBin,DecoderComposite,DecoderDummycode,DecoderPassThrough,DecoderRecode
Base class for all transform decoders providing both a row and block
interface for decoding matrices to frames.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabstract FrameBlockdecode(MatrixBlock in, FrameBlock out) Block decode API converting a matrix block into a frame block.decode(MatrixBlock in, FrameBlock out, int k) Block decode API converting a matrix block into a frame block in parallel.abstract voiddecode(MatrixBlock in, FrameBlock out, int rl, int ru) Block decode row blockString[]abstract voidinitMetaData(FrameBlock meta) voidRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.voidsetColnames(String[] colnames) subRangeDecoder(int colStart, int colEnd, int dummycodedOffset) Returns a new Decoder that only handles a sub range of columns.voidupdateIndexRanges(long[] beginDims, long[] endDims) Update index-ranges to after decoding.voidRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.
-
Method Details
-
getSchema
-
setColnames
-
getColnames
-
decode
Block decode API converting a matrix block into a frame block.- Parameters:
in- Input matrix blockout- Output frame block- Returns:
- returns given output frame block for convenience
-
decode
Block decode API converting a matrix block into a frame block in parallel.- Parameters:
in- Input matrix blockout- Output frame blockk- Parallelization degree- Returns:
- returns the given output frame block for convenience
-
decode
Block decode row block- Parameters:
in- input Matrix Blockout- output FrameBlockrl- row start to decoderu- row end to decode (not inclusive)
-
subRangeDecoder
Returns a new Decoder that only handles a sub range of columns. The sub-range refers to the columns after decoding.- 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) Update index-ranges to after decoding. Note that only Dummycoding changes the ranges.- Parameters:
beginDims- the begin indexes before encodingendDims- the end indexes before encoding
-
initMetaData
-
writeExternal
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.- Specified by:
writeExternalin interfaceExternalizable- Parameters:
os- object output- Throws:
IOException- if IOException occurs
-
readExternal
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.- Specified by:
readExternalin interfaceExternalizable- Parameters:
in- object input- Throws:
IOException- if IOException occur
-