Package org.apache.sysds.runtime.data
Class DataTensorBlock
java.lang.Object
org.apache.sysds.runtime.data.DataTensorBlock
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDataTensorBlock(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) -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy(int[] lower, int[] upper, DataTensorBlock src) Copy a part of anotherDataTensorBlockvoidcopy(DataTensorBlock that) get(int[] ix) doubleget(int r, int c) getColValueType(int col) intgetDim(int i) int[]getDims()longintintintbooleanbooleanisEmpty(boolean safe) voidreset()voidreset(int[] dims) voidreset(int[] dims, Types.ValueType[] schema) voidvoidset(int r, int c, double v) void
-
Constructor Details
-
DataTensorBlock
public DataTensorBlock() -
DataTensorBlock
-
DataTensorBlock
-
DataTensorBlock
-
DataTensorBlock
-
DataTensorBlock
-
DataTensorBlock
public DataTensorBlock(double val) -
DataTensorBlock
-
DataTensorBlock
-
-
Method Details
-
reset
public void reset() -
reset
public void reset(int[] dims) -
reset
-
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
-
getColValueType
-
get
-
get
public double get(int r, int c) -
set
-
set
-
set
public void set(int r, int c, double v) -
copy
-
copy
Copy a part of anotherDataTensorBlock- Parameters:
lower- lower index of elements to copy (inclusive)upper- upper index of elements to copy (exclusive)src- sourceDataTensorBlock
-