Package org.apache.sysds.runtime.data
Class DataTensorBlock
- java.lang.Object
-
- org.apache.sysds.runtime.data.DataTensorBlock
-
- All Implemented Interfaces:
Serializable
public class DataTensorBlock extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataTensorBlock()DataTensorBlock(double val)DataTensorBlock(int ncols, Types.ValueType vt)DataTensorBlock(Types.ValueType[] schema)DataTensorBlock(Types.ValueType[] schema, int[] dims)DataTensorBlock(Types.ValueType[] schema, int[] dims, String[][] data)DataTensorBlock(Types.ValueType vt, int[] dims)DataTensorBlock(BasicTensorBlock that)DataTensorBlock(DataTensorBlock that)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTensorBlockallocateBlock()voidcopy(int[] lower, int[] upper, DataTensorBlock src)Copy a part of anotherDataTensorBlockvoidcopy(DataTensorBlock that)Objectget(int[] ix)doubleget(int r, int c)Types.ValueTypegetColValueType(int col)intgetDim(int i)int[]getDims()longgetNonZeros()intgetNumColumns()intgetNumDims()intgetNumRows()Types.ValueType[]getSchema()booleanisAllocated()booleanisEmpty(boolean safe)voidreset()voidreset(int[] dims)voidreset(int[] dims, Types.ValueType[] schema)voidset(int[] ix, Object v)voidset(int r, int c, double v)voidset(Object v)
-
-
-
Constructor Detail
-
DataTensorBlock
public DataTensorBlock()
-
DataTensorBlock
public DataTensorBlock(int ncols, Types.ValueType vt)
-
DataTensorBlock
public DataTensorBlock(Types.ValueType[] schema)
-
DataTensorBlock
public DataTensorBlock(Types.ValueType[] schema, int[] dims)
-
DataTensorBlock
public DataTensorBlock(Types.ValueType vt, int[] dims)
-
DataTensorBlock
public DataTensorBlock(Types.ValueType[] schema, int[] dims, String[][] data)
-
DataTensorBlock
public DataTensorBlock(double val)
-
DataTensorBlock
public DataTensorBlock(DataTensorBlock that)
-
DataTensorBlock
public DataTensorBlock(BasicTensorBlock that)
-
-
Method Detail
-
reset
public void reset()
-
reset
public void reset(int[] dims)
-
reset
public void reset(int[] dims, Types.ValueType[] schema)
-
allocateBlock
public DataTensorBlock allocateBlock()
-
isAllocated
public boolean isAllocated()
-
isEmpty
public boolean isEmpty(boolean safe)
-
getNonZeros
public long getNonZeros()
-
getNumRows
public int getNumRows()
-
getNumColumns
public int getNumColumns()
-
getNumDims
public int getNumDims()
-
getDim
public int getDim(int i)
-
getDims
public int[] getDims()
-
getSchema
public Types.ValueType[] getSchema()
-
getColValueType
public Types.ValueType getColValueType(int col)
-
get
public Object get(int[] ix)
-
get
public double get(int r, int c)
-
set
public void set(Object v)
-
set
public void set(int[] ix, Object v)
-
set
public void set(int r, int c, double v)
-
copy
public void copy(DataTensorBlock that)
-
copy
public void copy(int[] lower, int[] upper, DataTensorBlock src)Copy a part of anotherDataTensorBlock- Parameters:
lower- lower index of elements to copy (inclusive)upper- upper index of elements to copy (exclusive)src- sourceDataTensorBlock
-
-