Class EncoderOmit
java.lang.Object
org.apache.sysds.runtime.transform.encode.LegacyEncoder
org.apache.sysds.runtime.transform.encode.EncoderOmit
- All Implemented Interfaces:
Externalizable,Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEncoderOmit(boolean federated) EncoderOmit(int[] colList, int clen) EncoderOmit(org.apache.wink.json4j.JSONObject parsedSpec, String[] colnames, int clen, int minCol, int maxCol) -
Method Summary
Modifier and TypeMethodDescriptionapply(FrameBlock in, MatrixBlock out) Encode input data blockwise according to existing transform meta data (transform apply).voidbuild(FrameBlock in) Build the transform meta data for the given block input.encode(FrameBlock in, MatrixBlock out) Block encode: build and apply (transform encode).booleangetMetaData(FrameBlock out) Construct a frame block out of the transform meta data.intintgetNumRemovedRows(boolean[] rmRows) inthashCode()intinitColList(int[] colList) voidinitMetaData(FrameBlock meta) Sets up the required meta data for a subsequent call to apply.booleanIndicates if this encoder is applicable, i.e, if there is at least one column to encode.voidmergeAt(EncoderOmit other, int row, int col) booleanvoidRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.subRangeEncoder(IndexRange ixRange) Returns a new Encoder that only handles a sub range of columns.voidupdateIndexRanges(long[] beginDims, long[] endDims) Update index-ranges to after encoding.voidRedirects 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
-
Constructor Details
-
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 Details
-
initColList
public int initColList(int[] colList) - Overrides:
initColListin classLegacyEncoder
-
isApplicable
public boolean isApplicable()Indicates if this encoder is applicable, i.e, if there is at least one column to encode.- Overrides:
isApplicablein classLegacyEncoder- Returns:
- true if at least one column to encode
-
getNumRemovedRows
public int getNumRemovedRows(boolean[] rmRows) -
getNumRemovedRows
public int getNumRemovedRows() -
omit
-
encode
Description copied from class:LegacyEncoderBlock encode: build and apply (transform encode).- Specified by:
encodein classLegacyEncoder- Parameters:
in- input frame blockout- output matrix block- Returns:
- output matrix block
-
build
Description copied from class:LegacyEncoderBuild the transform meta data for the given block input. This call modifies and keeps meta data as encoder state.- Specified by:
buildin classLegacyEncoder- Parameters:
in- input frame block
-
apply
Description copied from class:LegacyEncoderEncode input data blockwise according to existing transform meta data (transform apply).- Specified by:
applyin classLegacyEncoder- Parameters:
in- input frame blockout- output matrix block- Returns:
- output matrix block
-
subRangeEncoder
Description copied from class:LegacyEncoderReturns a new Encoder that only handles a sub range of columns.- Overrides:
subRangeEncoderin classLegacyEncoder- Parameters:
ixRange- the range (1-based, begin inclusive, end exclusive)- Returns:
- an encoder of the same type, just for the sub-range
-
mergeAt
-
updateIndexRanges
public void updateIndexRanges(long[] beginDims, long[] endDims) Description copied from class:LegacyEncoderUpdate index-ranges to after encoding. Note that only Dummycoding changes the ranges.- Overrides:
updateIndexRangesin classLegacyEncoder- Parameters:
beginDims- begin dimensions of rangeendDims- end dimensions of range
-
getMetaData
Description copied from class:LegacyEncoderConstruct a frame block out of the transform meta data.- Specified by:
getMetaDatain classLegacyEncoder- Parameters:
out- output frame block- Returns:
- output frame block?
-
initMetaData
Description copied from class:LegacyEncoderSets up the required meta data for a subsequent call to apply.- Specified by:
initMetaDatain classLegacyEncoder- Parameters:
meta- frame block
-
writeExternal
Description copied from class:LegacyEncoderRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classLegacyEncoder- Parameters:
out- object output- Throws:
IOException- if IOException occurs
-
readExternal
Description copied from class:LegacyEncoderRedirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classLegacyEncoder- Parameters:
in- object input- Throws:
IOException- if IOException occur
-
equals
-
hashCode
public int hashCode()
-