Package org.apache.sysds.runtime.meta

# Class TensorCharacteristics

java.lang.Object
org.apache.sysds.runtime.meta.DataCharacteristics
org.apache.sysds.runtime.meta.TensorCharacteristics

All Implemented Interfaces:
  `Serializable`

public class TensorCharacteristics extends DataCharacteristics

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int[]`
`DEFAULT_BLOCK_SIZE`

## Constructor Summary

Constructors
Constructor
Description
`TensorCharacteristics()`
`TensorCharacteristics(long[] dims, int blocksize)`
`TensorCharacteristics(long[] dims, int blocksize, long nnz)`
`TensorCharacteristics(long[] dims, long nnz)`
`TensorCharacteristics(DataCharacteristics that)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`colsKnown()`
`boolean`
`dimsKnown()`
`boolean`
`dimsKnown(boolean includeNnz)`
`boolean`
`equalDims(Object anObject)`
`boolean`
`equals(Object anObject)`
`long`
`getCols()`
`long`
`getDim(int i)`
`int[]`
`getIntDims()`
`long`
`getLength()`
`long[]`
`getLongDims()`
`long`
`getNonZeros()`
`long`
`getNonZerosBound()`
`long`
`getNumBlocks()`
`long`
`getNumBlocks(int i)`
`long`
`getNumColBlocks()`
`int`
`getNumDims()`
`long`
`getNumRowBlocks()`
`long`
`getRows()`
`double`
`getSparsity()`
`int`
`hashCode()`
`boolean`
`isUltraSparse()`
`boolean`
`mightHaveEmptyBlocks()`
`boolean`
`nnzKnown()`
`boolean`
`rowsKnown()`
`DataCharacteristics`
`set(long[] dims, int blocksize)`
`DataCharacteristics`
`set(long[] dims, int blocksize, long nnz)`
`DataCharacteristics`
`set(long nr, long nc, int blen)`
`DataCharacteristics`
`set(long nr, long nc, int blen, long nnz)`
`DataCharacteristics`
`set(DataCharacteristics that)`
`DataCharacteristics`
`setCols(long clen)`
`DataCharacteristics`
`setDim(int i, long dim)`
`DataCharacteristics`
`setDimension(long nr, long nc)`
`DataCharacteristics`
`setDims(long[] dims)`
`DataCharacteristics`
`setNonZeros(long nnz)`
`DataCharacteristics`
`setNonZerosBound(long nnz)`
`DataCharacteristics`
`setRows(long rlen)`
`String`
`toString()`

### Methods inherited from class org.apache.sysds.runtime.meta.DataCharacteristics

`getBlocksize, getDims, isNoEmptyBlocks, setBlocksize, setNoEmptyBlocks`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### DEFAULT_BLOCK_SIZE

public static final int[] DEFAULT_BLOCK_SIZE

## Constructor Details

### TensorCharacteristics

public TensorCharacteristics()

### TensorCharacteristics

public TensorCharacteristics(long[] dims, long nnz)

### TensorCharacteristics

public TensorCharacteristics(long[] dims, int blocksize)

### TensorCharacteristics

public TensorCharacteristics(long[] dims, int blocksize, long nnz)

### TensorCharacteristics

public TensorCharacteristics(DataCharacteristics that)

## Method Details

### set

public DataCharacteristics set(long[] dims, int blocksize)

Specified by:
  `set` in class `DataCharacteristics`

### set

public DataCharacteristics set(long[] dims, int blocksize, long nnz)

Specified by:
  `set` in class `DataCharacteristics`

### set

public DataCharacteristics set(DataCharacteristics that)

Specified by:
  `set` in class `DataCharacteristics`

### setNonZeros

public DataCharacteristics setNonZeros(long nnz)

Specified by:
  `setNonZeros` in class `DataCharacteristics`

### dimsKnown

public boolean dimsKnown()

Specified by:
  `dimsKnown` in class `DataCharacteristics`

### dimsKnown

public boolean dimsKnown(boolean includeNnz)

Specified by:
  `dimsKnown` in class `DataCharacteristics`

### nnzKnown

public boolean nnzKnown()

Specified by:
  `nnzKnown` in class `DataCharacteristics`

### getNumDims

public int getNumDims()

Specified by:
  `getNumDims` in class `DataCharacteristics`

### getDim

public long getDim(int i)

Specified by:
  `getDim` in class `DataCharacteristics`

### getLongDims

public long[] getLongDims()

Specified by:
  `getLongDims` in class `DataCharacteristics`

### getIntDims

public int[] getIntDims()

Specified by:
  `getIntDims` in class `DataCharacteristics`

### setDim

public DataCharacteristics setDim(int i, long dim)

Specified by:
  `setDim` in class `DataCharacteristics`

### setDims

public DataCharacteristics setDims(long[] dims)

Specified by:
  `setDims` in class `DataCharacteristics`

### getLength

public long getLength()

Specified by:
  `getLength` in class `DataCharacteristics`

### getNumBlocks

public long getNumBlocks()

Overrides:
  `getNumBlocks` in class `DataCharacteristics`

### getNumBlocks

public long getNumBlocks(int i)

Specified by:
  `getNumBlocks` in class `DataCharacteristics`

### getNonZeros

public long getNonZeros()

Specified by:
  `getNonZeros` in class `DataCharacteristics`

### getRows

public long getRows()

Specified by:
  `getRows` in class `DataCharacteristics`

### getCols

public long getCols()

Specified by:
  `getCols` in class `DataCharacteristics`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### equalDims

public boolean equalDims(Object anObject)

Specified by:
  `equalDims` in class `DataCharacteristics`

### equals

public boolean equals(Object anObject)

Specified by:
  `equals` in class `DataCharacteristics`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in class `DataCharacteristics`

### set

public DataCharacteristics set(long nr, long nc, int blen)

Specified by:
  `set` in class `DataCharacteristics`

### set

public DataCharacteristics set(long nr, long nc, int blen, long nnz)

Specified by:
  `set` in class `DataCharacteristics`

### setRows

public DataCharacteristics setRows(long rlen)

Specified by:
  `setRows` in class `DataCharacteristics`

### setCols

public DataCharacteristics setCols(long clen)

Specified by:
  `setCols` in class `DataCharacteristics`

### getNumRowBlocks

public long getNumRowBlocks()

Specified by:
  `getNumRowBlocks` in class `DataCharacteristics`

### getNumColBlocks

public long getNumColBlocks()

Specified by:
  `getNumColBlocks` in class `DataCharacteristics`

### setDimension

public DataCharacteristics setDimension(long nr, long nc)

Specified by:
  `setDimension` in class `DataCharacteristics`

### setNonZerosBound

public DataCharacteristics setNonZerosBound(long nnz)

Specified by:
  `setNonZerosBound` in class `DataCharacteristics`

### getNonZerosBound

public long getNonZerosBound()

Specified by:
  `getNonZerosBound` in class `DataCharacteristics`

### getSparsity

public double getSparsity()

Specified by:
  `getSparsity` in class `DataCharacteristics`

### rowsKnown

public boolean rowsKnown()

Specified by:
  `rowsKnown` in class `DataCharacteristics`

### colsKnown

public boolean colsKnown()

Specified by:
  `colsKnown` in class `DataCharacteristics`

### isUltraSparse

public boolean isUltraSparse()

Specified by:
  `isUltraSparse` in class `DataCharacteristics`

### mightHaveEmptyBlocks

public boolean mightHaveEmptyBlocks()

Specified by:
  `mightHaveEmptyBlocks` in class `DataCharacteristics`