Class Decoder
- java.lang.Object
- 
- org.apache.sysds.runtime.transform.decode.Decoder
 
- 
- All Implemented Interfaces:
- Externalizable,- Serializable
 - Direct Known Subclasses:
- DecoderComposite,- DecoderDummycode,- DecoderPassThrough,- DecoderRecode
 
 public abstract class Decoder extends Object implements Externalizable Base class for all transform decoders providing both a row and block interface for decoding matrices to frames.- See Also:
- Serialized Form
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract FrameBlockdecode(MatrixBlock in, FrameBlock out)Block decode API converting a matrix block into a frame block.String[]getColnames()Types.ValueType[]getSchema()abstract voidinitMetaData(FrameBlock meta)voidreadExternal(ObjectInput in)Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.voidsetColnames(String[] colnames)DecodersubRangeDecoder(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.voidwriteExternal(ObjectOutput os)Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.
 
- 
- 
- 
Method Detail- 
getSchemapublic Types.ValueType[] getSchema() 
 - 
setColnamespublic void setColnames(String[] colnames) 
 - 
getColnamespublic String[] getColnames() 
 - 
decodepublic abstract FrameBlock decode(MatrixBlock in, FrameBlock out) Block decode API converting a matrix block into a frame block.- Parameters:
- in- input matrix block
- out- output frame block
- Returns:
- returns given output frame block for convenience
 
 - 
subRangeDecoderpublic Decoder subRangeDecoder(int colStart, int colEnd, int dummycodedOffset) 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
 
 - 
updateIndexRangespublic 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 encoding
- endDims- the end indexes before encoding
 
 - 
initMetaDatapublic abstract void initMetaData(FrameBlock meta) 
 - 
writeExternalpublic void writeExternal(ObjectOutput os) throws IOException Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.- Specified by:
- writeExternalin interface- Externalizable
- Parameters:
- os- object output
- Throws:
- IOException- if IOException occurs
 
 - 
readExternalpublic void readExternal(ObjectInput in) throws IOException Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.- Specified by:
- readExternalin interface- Externalizable
- Parameters:
- in- object input
- Throws:
- IOException- if IOException occur
 
 
- 
 
-