Class FrameBlock
- java.lang.Object
- 
- org.apache.sysds.runtime.matrix.data.FrameBlock
 
- 
- All Implemented Interfaces:
- Externalizable,- Serializable,- org.apache.hadoop.io.Writable,- CacheBlock
 
 public class FrameBlock extends Object implements CacheBlock, Externalizable - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFrameBlock.ColumnMetadatastatic classFrameBlock.FrameMapFunction
 - 
Field SummaryFields Modifier and Type Field Description static intBUFFER_SIZE
 - 
Constructor SummaryConstructors Constructor Description FrameBlock()FrameBlock(int ncols, Types.ValueType vt)FrameBlock(Types.ValueType[] schema)FrameBlock(Types.ValueType[] schema, String[] names)FrameBlock(Types.ValueType[] schema, String[][] data)FrameBlock(Types.ValueType[] schema, String[] names, String[][] data)FrameBlock(FrameBlock that)Copy constructor for frame blocks, which uses a shallow copy for the schema (column types and names) but a deep copy for meta data and actual column data.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FrameBlockappend(FrameBlock that, FrameBlock ret, boolean cbind)Appends the given argument frameblock 'that' to this frameblock by creating a deep copy to prevent side effects.voidappendColumn(boolean[] col)Append a column of value type BOOLEAN as the last column of the data frame.voidappendColumn(double[] col)Append a column of value type DOUBLE as the last column of the data frame.voidappendColumn(float[] col)Append a column of value type float as the last column of the data frame.voidappendColumn(int[] col)Append a column of value type INT as the last column of the data frame.voidappendColumn(long[] col)Append a column of value type LONG as the last column of the data frame.voidappendColumn(String[] col)Append a column of value type STRING as the last column of the data frame.voidappendColumn(Types.ValueType vt, org.apache.sysds.runtime.matrix.data.FrameBlock.Array col)voidappendColumns(double[][] cols)Append a set of column of value type DOUBLE at the end of the frame in order to avoid repeated allocation with appendColumns.voidappendRow(Object[] row)Append a row to the end of the data frame, where all row fields are boxed objects according to the schema.voidappendRow(String[] row)Append a row to the end of the data frame, where all row fields are string encoded.FrameBlockbinaryOperations(BinaryOperator bop, FrameBlock that, FrameBlock out)This method performs the value comparison on two frames if the values in both frames are equal, not equal, less than, greater than, less than/greater than and equal to the output frame will store boolean value for each each comparisonvoidcompactEmptyBlock()Free unnecessarily allocated empty block.voidcopy(int rl, int ru, int cl, int cu, FrameBlock src)voidcopy(FrameBlock src)static StringcreateColName(int i)static String[]createColNames(int size)static String[]createColNames(int off, int size)FrameBlockdetectSchemaFromRow(double sampleFraction)FrameBlockdropInvalidType(FrameBlock schema)Drop the cell value which does not confirms to the data type of its columnvoidensureAllocatedColumns(int numRows)Allocate column data structures if necessary, i.e., if schema specified but not all column data structures created yet.voidensureColumnCompatibility(int newlen)Checks for matching column sizes in case of existing columns.FrameBlockframeRowReplication(FrameBlock rowToreplicate)Objectget(int r, int c)Gets a boxed object of the value in position (r,c).org.apache.sysds.runtime.matrix.data.FrameBlock.ArraygetColumn(int c)byte[]getColumnAsBytes(int c)ObjectgetColumnData(int c)FrameBlock.ColumnMetadata[]getColumnMetadata()FrameBlock.ColumnMetadatagetColumnMetadata(int c)StringgetColumnName(int c)Returns the column name for the requested column.Map<String,Integer>getColumnNameIDMap()Creates a mapping from column names to column IDs, i.e., 1-based column indexesString[]getColumnNames()Returns the column names of the frame block.String[]getColumnNames(boolean alloc)Returns the column names of the frame block.FrameBlockgetColumnNamesAsFrame()StringgetColumnType(int c)static FrameBlock.FrameMapFunctiongetCompiledFunction(String lambdaExpr, long margin)DataCharacteristicsgetDataCharacteristics()doublegetDouble(int r, int c)Returns the double value at the passed row and column.doublegetDoubleNaN(int r, int c)Returns the double value at the passed row and column.longgetExactSerializedSize()Get the exact serialized size in bytes of the cache block.byte[]getIndexAsBytes(int c, int r)Get a specific index as bytes, this method is used to parse the strings into Python.longgetInMemorySize()Get the in-memory size in bytes of the cache block.intgetNumColumns()Get the number of columns of the frame block, that is the number of columns defined in the schema.intgetNumRows()Get the number of rows of the frame block.Iterator<Object[]>getObjectRowIterator()Get a row iterator over the frame where all fields are encoded as boxed objects according to their value types.Iterator<Object[]>getObjectRowIterator(int[] cols)Get a row iterator over the frame where all selected fields are encoded as boxed objects according to their value types.Iterator<Object[]>getObjectRowIterator(int rl, int ru)Get a row iterator over the frame where all fields are encoded as boxed objects according to their value types.Iterator<Object[]>getObjectRowIterator(int rl, int ru, int[] cols)Get a row iterator over the frame where all selected fields are encoded as boxed objects according to their value types.Iterator<Object[]>getObjectRowIterator(Types.ValueType[] schema)Get a row iterator over the frame where all fields are encoded as boxed objects according to the value types of the provided target schema.HashMap<String,Long>getRecodeMap(int col)This function will split every Recode map in the column using delimiter Lop.DATATYPE_PREFIX, as Recode map generated earlier in the form of Code+Lop.DATATYPE_PREFIX+Token and store it in a map which contains token and code for every unique tokens.Types.ValueType[]getSchema()Returns the schema of the frame block.FrameBlockgetSchemaTypeOf()StringgetString(int r, int c)Returns the string of the value at the passed row and column.Iterator<String[]>getStringRowIterator()Get a row iterator over the frame where all fields are encoded as strings independent of their value types.Iterator<String[]>getStringRowIterator(int colID)Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.Iterator<String[]>getStringRowIterator(int[] cols)Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.Iterator<String[]>getStringRowIterator(int rl, int ru)Get a row iterator over the frame where all fields are encoded as strings independent of their value types.Iterator<String[]>getStringRowIterator(int rl, int ru, int colID)Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.Iterator<String[]>getStringRowIterator(int rl, int ru, int[] cols)Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.FrameBlockinvalidByLength(MatrixBlock feaLen)This method validates the frame data against an attribute length constrain if data value in any cell is greater than the specified threshold of that attribute the output frame will store a null on that cell position, thus removing the length-violating values.booleanisColNameDefault(int i)booleanisColNamesDefault()booleanisColumnMetadataDefault()booleanisColumnMetadataDefault(int c)booleanisShallowSerialize()Indicates if the cache block is subject to shallow serialized, which is generally true if in-memory size and serialized size are almost identical allowing to avoid unnecessary deep serialize.booleanisShallowSerialize(boolean inclConvert)Indicates if the cache block is subject to shallow serialized, which is generally true if in-memory size and serialized size are almost identical allowing to avoid unnecessary deep serialize.FrameBlockleftIndexingOperations(FrameBlock rhsFrame, int rl, int ru, int cl, int cu, FrameBlock ret)FrameBlockleftIndexingOperations(FrameBlock rhsFrame, IndexRange ixrange, FrameBlock ret)FrameBlockmap(String lambdaExpr, long margin)FrameBlockmap(FrameBlock.FrameMapFunction lambdaExpr, long margin)FrameBlockmapDist(FrameBlock.FrameMapFunction lambdaExpr)voidmapInplace(Function<String,String> fun)voidmerge(CacheBlock that, boolean bDummy)Merge the given block into the current block.voidmerge(FrameBlock that)static FrameBlockmergeSchema(FrameBlock temp1, FrameBlock temp2)voidreadExternal(ObjectInput in)voidreadFields(DataInput in)voidrecomputeColumnCardinality()FrameBlockremoveEmptyOperations(boolean rows, boolean emptyReturn, MatrixBlock select)<T> FrameBlockreplaceOperations(String pattern, String replacement)voidreset()voidreset(int nrow, boolean clearMeta)voidset(int r, int c, Object val)Sets the value in position (r,c), where the input is assumed to be a boxed object consistent with the schema definition.voidsetColumn(int c, org.apache.sysds.runtime.matrix.data.FrameBlock.Array column)voidsetColumnMetadata(int c, FrameBlock.ColumnMetadata colmeta)voidsetColumnMetadata(FrameBlock.ColumnMetadata[] colmeta)voidsetColumnNames(String[] colnames)voidsetNumRows(int numRows)voidsetSchema(Types.ValueType[] schema)Sets the schema of the frame block.FrameBlockslice(int rl, int ru, int cl, int cu, boolean deep, CacheBlock retCache)Right indexing operations to slice a subframe out of this frame block.FrameBlockslice(int rl, int ru, int cl, int cu, CacheBlock retCache)Slice a sub block out of the current block and write into the given output block.voidslice(ArrayList<Pair<Long,FrameBlock>> outlist, IndexRange range, int rowCut)FrameBlockslice(IndexRange ixrange, FrameBlock ret)voidtoShallowSerializeBlock()Converts a cache block that is not shallow serializable into a form that is shallow serializable.StringtoString()FrameBlockvalueSwap(FrameBlock schema)voidwrite(DataOutput out)voidwriteExternal(ObjectOutput out)FrameBlockzeroOutOperations(FrameBlock result, IndexRange range, boolean complementary, int iRowStartSrc, int iRowStartDest, int blen, int iMaxRowsToCopy)This function ZERO OUT the data in the slicing window applicable for this block.
 
- 
- 
- 
Field Detail- 
BUFFER_SIZEpublic static final int BUFFER_SIZE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
FrameBlockpublic FrameBlock() 
 - 
FrameBlockpublic FrameBlock(FrameBlock that) Copy constructor for frame blocks, which uses a shallow copy for the schema (column types and names) but a deep copy for meta data and actual column data.- Parameters:
- that- frame block
 
 - 
FrameBlockpublic FrameBlock(int ncols, Types.ValueType vt)
 - 
FrameBlockpublic FrameBlock(Types.ValueType[] schema) 
 - 
FrameBlockpublic FrameBlock(Types.ValueType[] schema, String[] names) 
 - 
FrameBlockpublic FrameBlock(Types.ValueType[] schema, String[][] data) 
 - 
FrameBlockpublic FrameBlock(Types.ValueType[] schema, String[] names, String[][] data) 
 
- 
 - 
Method Detail- 
getNumRowspublic int getNumRows() Get the number of rows of the frame block.- Specified by:
- getNumRowsin interface- CacheBlock
- Returns:
- number of rows
 
 - 
getDoublepublic double getDouble(int r, int c)Description copied from interface:CacheBlockReturns the double value at the passed row and column. If the value is missing 0 is returned.- Specified by:
- getDoublein interface- CacheBlock
- Parameters:
- r- row of the value
- c- column of the value
- Returns:
- double value at the passed row and column
 
 - 
getDoubleNaNpublic double getDoubleNaN(int r, int c)Description copied from interface:CacheBlockReturns the double value at the passed row and column. If the value is missing NaN is returned.- Specified by:
- getDoubleNaNin interface- CacheBlock
- Parameters:
- r- row of the value
- c- column of the value
- Returns:
- double value at the passed row and column
 
 - 
getStringpublic String getString(int r, int c) Description copied from interface:CacheBlockReturns the string of the value at the passed row and column. If the value is missing or NaN, null is returned.- Specified by:
- getStringin interface- CacheBlock
- Parameters:
- r- row of the value
- c- column of the value
- Returns:
- string of the value at the passed row and column
 
 - 
setNumRowspublic void setNumRows(int numRows) 
 - 
getNumColumnspublic int getNumColumns() Get the number of columns of the frame block, that is the number of columns defined in the schema.- Specified by:
- getNumColumnsin interface- CacheBlock
- Returns:
- number of columns
 
 - 
getDataCharacteristicspublic DataCharacteristics getDataCharacteristics() - Specified by:
- getDataCharacteristicsin interface- CacheBlock
 
 - 
getSchemapublic Types.ValueType[] getSchema() Returns the schema of the frame block.- Returns:
- schema as array of ValueTypes
 
 - 
setSchemapublic void setSchema(Types.ValueType[] schema) Sets the schema of the frame block.- Parameters:
- schema- schema as array of ValueTypes
 
 - 
getColumnNamespublic String[] getColumnNames() Returns the column names of the frame block. This method allocates default column names if required.- Returns:
- column names
 
 - 
getColumnNamesAsFramepublic FrameBlock getColumnNamesAsFrame() 
 - 
getColumnNamespublic String[] getColumnNames(boolean alloc) Returns the column names of the frame block. This method allocates default column names if required.- Parameters:
- alloc- if true, create column names
- Returns:
- array of column names
 
 - 
getColumnNamepublic String getColumnName(int c) Returns the column name for the requested column. This method allocates default column names if required.- Parameters:
- c- column index
- Returns:
- column name
 
 - 
setColumnNamespublic void setColumnNames(String[] colnames) 
 - 
getColumnMetadatapublic FrameBlock.ColumnMetadata[] getColumnMetadata() 
 - 
getColumnMetadatapublic FrameBlock.ColumnMetadata getColumnMetadata(int c) 
 - 
isColumnMetadataDefaultpublic boolean isColumnMetadataDefault() 
 - 
isColumnMetadataDefaultpublic boolean isColumnMetadataDefault(int c) 
 - 
setColumnMetadatapublic void setColumnMetadata(FrameBlock.ColumnMetadata[] colmeta) 
 - 
setColumnMetadatapublic void setColumnMetadata(int c, FrameBlock.ColumnMetadata colmeta)
 - 
getColumnNameIDMappublic Map<String,Integer> getColumnNameIDMap() Creates a mapping from column names to column IDs, i.e., 1-based column indexes- Returns:
- map of column name keys and id values
 
 - 
ensureAllocatedColumnspublic void ensureAllocatedColumns(int numRows) Allocate column data structures if necessary, i.e., if schema specified but not all column data structures created yet.- Parameters:
- numRows- number of rows
 
 - 
ensureColumnCompatibilitypublic void ensureColumnCompatibility(int newlen) Checks for matching column sizes in case of existing columns.- Parameters:
- newlen- number of rows to compare with existing number of rows
 
 - 
createColNamespublic static String[] createColNames(int size) 
 - 
createColNamespublic static String[] createColNames(int off, int size) 
 - 
createColNamepublic static String createColName(int i) 
 - 
isColNamesDefaultpublic boolean isColNamesDefault() 
 - 
isColNameDefaultpublic boolean isColNameDefault(int i) 
 - 
recomputeColumnCardinalitypublic void recomputeColumnCardinality() 
 - 
getpublic Object get(int r, int c) Gets a boxed object of the value in position (r,c).- Parameters:
- r- row index, 0-based
- c- column index, 0-based
- Returns:
- object of the value at specified position
 
 - 
setpublic void set(int r, int c, Object val)Sets the value in position (r,c), where the input is assumed to be a boxed object consistent with the schema definition.- Parameters:
- r- row index
- c- column index
- val- value to set at specified position
 
 - 
resetpublic void reset(int nrow, boolean clearMeta)
 - 
resetpublic void reset() 
 - 
appendRowpublic void appendRow(Object[] row) Append a row to the end of the data frame, where all row fields are boxed objects according to the schema.- Parameters:
- row- array of objects
 
 - 
appendRowpublic void appendRow(String[] row) Append a row to the end of the data frame, where all row fields are string encoded.- Parameters:
- row- array of strings
 
 - 
appendColumnpublic void appendColumn(String[] col) Append a column of value type STRING as the last column of the data frame. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- col- array of strings
 
 - 
appendColumnpublic void appendColumn(boolean[] col) Append a column of value type BOOLEAN as the last column of the data frame. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- col- array of booleans
 
 - 
appendColumnpublic void appendColumn(int[] col) Append a column of value type INT as the last column of the data frame. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- col- array of longs
 
 - 
appendColumnpublic void appendColumn(long[] col) Append a column of value type LONG as the last column of the data frame. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- col- array of longs
 
 - 
appendColumnpublic void appendColumn(float[] col) Append a column of value type float as the last column of the data frame. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- col- array of doubles
 
 - 
appendColumnpublic void appendColumn(double[] col) Append a column of value type DOUBLE as the last column of the data frame. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- col- array of doubles
 
 - 
appendColumnspublic void appendColumns(double[][] cols) Append a set of column of value type DOUBLE at the end of the frame in order to avoid repeated allocation with appendColumns. The given array is wrapped but not copied and hence might be updated in the future.- Parameters:
- cols- 2d array of doubles
 
 - 
appendColumnpublic void appendColumn(Types.ValueType vt, org.apache.sysds.runtime.matrix.data.FrameBlock.Array col) 
 - 
getColumnDatapublic Object getColumnData(int c) 
 - 
getColumnTypepublic String getColumnType(int c) 
 - 
getIndexAsBytespublic byte[] getIndexAsBytes(int c, int r)Get a specific index as bytes, this method is used to parse the strings into Python. It should only be used in columns where the datatype is String. Since in other cases it might be faster to return other types. Note that P- Parameters:
- c- The column index.
- r- The row index.
- Returns:
- The returned byte array.
 
 - 
getColumnAsBytespublic byte[] getColumnAsBytes(int c) 
 - 
getColumnpublic org.apache.sysds.runtime.matrix.data.FrameBlock.Array getColumn(int c) 
 - 
setColumnpublic void setColumn(int c, org.apache.sysds.runtime.matrix.data.FrameBlock.Array column)
 - 
getStringRowIteratorpublic Iterator<String[]> getStringRowIterator() Get a row iterator over the frame where all fields are encoded as strings independent of their value types.- Returns:
- string array iterator
 
 - 
getStringRowIteratorpublic Iterator<String[]> getStringRowIterator(int[] cols) Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.- Parameters:
- cols- column selection, 1-based
- Returns:
- string array iterator
 
 - 
getStringRowIteratorpublic Iterator<String[]> getStringRowIterator(int colID) Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.- Parameters:
- colID- column selection, 1-based
- Returns:
- string array iterator
 
 - 
getStringRowIteratorpublic Iterator<String[]> getStringRowIterator(int rl, int ru) Get a row iterator over the frame where all fields are encoded as strings independent of their value types.- Parameters:
- rl- lower row index
- ru- upper row index
- Returns:
- string array iterator
 
 - 
getStringRowIteratorpublic Iterator<String[]> getStringRowIterator(int rl, int ru, int[] cols) Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.- Parameters:
- rl- lower row index
- ru- upper row index
- cols- column selection, 1-based
- Returns:
- string array iterator
 
 - 
getStringRowIteratorpublic Iterator<String[]> getStringRowIterator(int rl, int ru, int colID) Get a row iterator over the frame where all selected fields are encoded as strings independent of their value types.- Parameters:
- rl- lower row index
- ru- upper row index
- colID- columnID, 1-based
- Returns:
- string array iterator
 
 - 
getObjectRowIteratorpublic Iterator<Object[]> getObjectRowIterator() Get a row iterator over the frame where all fields are encoded as boxed objects according to their value types.- Returns:
- object array iterator
 
 - 
getObjectRowIteratorpublic Iterator<Object[]> getObjectRowIterator(Types.ValueType[] schema) Get a row iterator over the frame where all fields are encoded as boxed objects according to the value types of the provided target schema.- Parameters:
- schema- target schema of objects
- Returns:
- object array iterator
 
 - 
getObjectRowIteratorpublic Iterator<Object[]> getObjectRowIterator(int[] cols) Get a row iterator over the frame where all selected fields are encoded as boxed objects according to their value types.- Parameters:
- cols- column selection, 1-based
- Returns:
- object array iterator
 
 - 
getObjectRowIteratorpublic Iterator<Object[]> getObjectRowIterator(int rl, int ru) Get a row iterator over the frame where all fields are encoded as boxed objects according to their value types.- Parameters:
- rl- lower row index
- ru- upper row index
- Returns:
- object array iterator
 
 - 
getObjectRowIteratorpublic Iterator<Object[]> getObjectRowIterator(int rl, int ru, int[] cols) Get a row iterator over the frame where all selected fields are encoded as boxed objects according to their value types.- Parameters:
- rl- lower row index
- ru- upper row index
- cols- column selection, 1-based
- Returns:
- object array iterator
 
 - 
writepublic void write(DataOutput out) throws IOException - Specified by:
- writein interface- org.apache.hadoop.io.Writable
- Throws:
- IOException
 
 - 
readFieldspublic void readFields(DataInput in) throws IOException - Specified by:
- readFieldsin interface- org.apache.hadoop.io.Writable
- Throws:
- IOException
 
 - 
writeExternalpublic void writeExternal(ObjectOutput out) throws IOException - Specified by:
- writeExternalin interface- Externalizable
- Throws:
- IOException
 
 - 
readExternalpublic void readExternal(ObjectInput in) throws IOException - Specified by:
- readExternalin interface- Externalizable
- Throws:
- IOException
 
 - 
getInMemorySizepublic long getInMemorySize() Description copied from interface:CacheBlockGet the in-memory size in bytes of the cache block.- Specified by:
- getInMemorySizein interface- CacheBlock
- Returns:
- in-memory size in bytes of cache block
 
 - 
getExactSerializedSizepublic long getExactSerializedSize() Description copied from interface:CacheBlockGet the exact serialized size in bytes of the cache block.- Specified by:
- getExactSerializedSizein interface- CacheBlock
- Returns:
- exact serialized size in bytes of cache block
 
 - 
isShallowSerializepublic boolean isShallowSerialize() Description copied from interface:CacheBlockIndicates if the cache block is subject to shallow serialized, which is generally true if in-memory size and serialized size are almost identical allowing to avoid unnecessary deep serialize.- Specified by:
- isShallowSerializein interface- CacheBlock
- Returns:
- true if shallow serialized
 
 - 
isShallowSerializepublic boolean isShallowSerialize(boolean inclConvert) Description copied from interface:CacheBlockIndicates if the cache block is subject to shallow serialized, which is generally true if in-memory size and serialized size are almost identical allowing to avoid unnecessary deep serialize.- Specified by:
- isShallowSerializein interface- CacheBlock
- Parameters:
- inclConvert- if true report blocks as shallow serialize that are currently not amenable but can be brought into an amenable form via- toShallowSerializeBlock.
- Returns:
- true if shallow serialized
 
 - 
toShallowSerializeBlockpublic void toShallowSerializeBlock() Description copied from interface:CacheBlockConverts a cache block that is not shallow serializable into a form that is shallow serializable. This methods has no affect if the given cache block is not amenable.- Specified by:
- toShallowSerializeBlockin interface- CacheBlock
 
 - 
compactEmptyBlockpublic void compactEmptyBlock() Description copied from interface:CacheBlockFree unnecessarily allocated empty block.- Specified by:
- compactEmptyBlockin interface- CacheBlock
 
 - 
binaryOperationspublic FrameBlock binaryOperations(BinaryOperator bop, FrameBlock that, FrameBlock out) This method performs the value comparison on two frames if the values in both frames are equal, not equal, less than, greater than, less than/greater than and equal to the output frame will store boolean value for each each comparison- Parameters:
- bop- binary operator
- that- frame block of rhs of m * n dimensions
- out- output frame block
- Returns:
- a boolean frameBlock
 
 - 
leftIndexingOperationspublic FrameBlock leftIndexingOperations(FrameBlock rhsFrame, IndexRange ixrange, FrameBlock ret) 
 - 
leftIndexingOperationspublic FrameBlock leftIndexingOperations(FrameBlock rhsFrame, int rl, int ru, int cl, int cu, FrameBlock ret) 
 - 
slicepublic FrameBlock slice(IndexRange ixrange, FrameBlock ret) 
 - 
slicepublic FrameBlock slice(int rl, int ru, int cl, int cu, CacheBlock retCache) Description copied from interface:CacheBlockSlice a sub block out of the current block and write into the given output block. This method returns the passed instance if not null.- Specified by:
- slicein interface- CacheBlock
- Parameters:
- rl- row lower
- ru- row upper
- cl- column lower
- cu- column upper
- retCache- cache block
- Returns:
- sub-block of cache block
 
 - 
slicepublic FrameBlock slice(int rl, int ru, int cl, int cu, boolean deep, CacheBlock retCache) Right indexing operations to slice a subframe out of this frame block. Note that the existing column value types are preserved.- Specified by:
- slicein interface- CacheBlock
- Parameters:
- rl- row lower index, inclusive, 0-based
- ru- row upper index, inclusive, 0-based
- cl- column lower index, inclusive, 0-based
- cu- column upper index, inclusive, 0-based
- deep- enforce deep-copy
- retCache- cache block
- Returns:
- frame block
 
 - 
slicepublic void slice(ArrayList<Pair<Long,FrameBlock>> outlist, IndexRange range, int rowCut) 
 - 
appendpublic FrameBlock append(FrameBlock that, FrameBlock ret, boolean cbind) Appends the given argument frameblock 'that' to this frameblock by creating a deep copy to prevent side effects. For cbind, the frames are appended column-wise (same number of rows), while for rbind the frames are appended row-wise (same number of columns).- Parameters:
- that- frame block to append to current frame block
- ret- frame block to return, can be null
- cbind- if true, column append
- Returns:
- frame block
 
 - 
copypublic void copy(FrameBlock src) 
 - 
copypublic void copy(int rl, int ru, int cl, int cu, FrameBlock src)
 - 
getRecodeMappublic HashMap<String,Long> getRecodeMap(int col) This function will split every Recode map in the column using delimiter Lop.DATATYPE_PREFIX, as Recode map generated earlier in the form of Code+Lop.DATATYPE_PREFIX+Token and store it in a map which contains token and code for every unique tokens.- Parameters:
- col- is the column # from frame data which contains Recode map generated earlier.
- Returns:
- map of token and code for every element in the input column of a frame containing Recode map
 
 - 
mergepublic void merge(CacheBlock that, boolean bDummy) Description copied from interface:CacheBlockMerge the given block into the current block. Both blocks needs to be of equal dimensions and contain disjoint non-zero cells.- Specified by:
- mergein interface- CacheBlock
- Parameters:
- that- cache block
- bDummy- ?
 
 - 
mergepublic void merge(FrameBlock that) 
 - 
zeroOutOperationspublic FrameBlock zeroOutOperations(FrameBlock result, IndexRange range, boolean complementary, int iRowStartSrc, int iRowStartDest, int blen, int iMaxRowsToCopy) This function ZERO OUT the data in the slicing window applicable for this block.- Parameters:
- result- frame block
- range- index range
- complementary- ?
- iRowStartSrc- ?
- iRowStartDest- ?
- blen- ?
- iMaxRowsToCopy- ?
- Returns:
- frame block
 
 - 
getSchemaTypeOfpublic FrameBlock getSchemaTypeOf() 
 - 
detectSchemaFromRowpublic FrameBlock detectSchemaFromRow(double sampleFraction) 
 - 
dropInvalidTypepublic FrameBlock dropInvalidType(FrameBlock schema) Drop the cell value which does not confirms to the data type of its column- Parameters:
- schema- of the frame
- Returns:
- original frame where invalid values are replaced with null
 
 - 
invalidByLengthpublic FrameBlock invalidByLength(MatrixBlock feaLen) This method validates the frame data against an attribute length constrain if data value in any cell is greater than the specified threshold of that attribute the output frame will store a null on that cell position, thus removing the length-violating values.- Parameters:
- feaLen- vector of valid lengths
- Returns:
- FrameBlock with invalid values converted into missing values (null)
 
 - 
mergeSchemapublic static FrameBlock mergeSchema(FrameBlock temp1, FrameBlock temp2) 
 - 
mappublic FrameBlock map(String lambdaExpr, long margin) 
 - 
frameRowReplicationpublic FrameBlock frameRowReplication(FrameBlock rowToreplicate) 
 - 
valueSwappublic FrameBlock valueSwap(FrameBlock schema) 
 - 
mappublic FrameBlock map(FrameBlock.FrameMapFunction lambdaExpr, long margin) 
 - 
mapDistpublic FrameBlock mapDist(FrameBlock.FrameMapFunction lambdaExpr) 
 - 
getCompiledFunctionpublic static FrameBlock.FrameMapFunction getCompiledFunction(String lambdaExpr, long margin) 
 - 
replaceOperationspublic <T> FrameBlock replaceOperations(String pattern, String replacement) 
 - 
removeEmptyOperationspublic FrameBlock removeEmptyOperations(boolean rows, boolean emptyReturn, MatrixBlock select) 
 
- 
 
-