Package org.apache.sysds.api.mlcontext
Class Metadata
- java.lang.Object
- 
- org.apache.sysds.api.mlcontext.Metadata
 
- 
- Direct Known Subclasses:
- FrameMetadata,- MatrixMetadata
 
 public abstract class Metadata extends Object Abstract metadata class for MLContext API. Complex types such as SystemDS matrices and frames typically require metadata, so this abstract class serves as a common parent class of these types.
- 
- 
Constructor SummaryConstructors Constructor Description Metadata()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description MatrixCharacteristicsasMatrixCharacteristics()Convert the metadata to a DataCharacteristics object.IntegergetBlocksize()Obtain the number of rows/cols per blockLonggetNumColumns()Obtain the number of columnsLonggetNumNonZeros()Obtain the number of non-zero valuesLonggetNumRows()Obtain the number of rowsvoidsetBlocksize(Integer blen)Set the number of rows per blockvoidsetMatrixCharacteristics(MatrixCharacteristics matrixCharacteristics)Set the metadata fields based on a DataCharacteristics object.voidsetNumColumns(Long numColumns)Set the number of columnsvoidsetNumNonZeros(Long numNonZeros)Set the number of non-zero valuesvoidsetNumRows(Long numRows)Set the number of rowsStringtoString()
 
- 
- 
- 
Method Detail- 
asMatrixCharacteristicspublic MatrixCharacteristics asMatrixCharacteristics() Convert the metadata to a DataCharacteristics object. If all field values arenull,nullis returned.- Returns:
- the metadata as a DataCharacteristics object, or nullif all field values are null
 
 - 
getNumColumnspublic Long getNumColumns() Obtain the number of columns- Returns:
- the number of columns
 
 - 
getNumNonZerospublic Long getNumNonZeros() Obtain the number of non-zero values- Returns:
- the number of non-zero values
 
 - 
getNumRowspublic Long getNumRows() Obtain the number of rows- Returns:
- the number of rows
 
 - 
getBlocksizepublic Integer getBlocksize() Obtain the number of rows/cols per block- Returns:
- the number of rows/cols per block
 
 - 
setMatrixCharacteristicspublic void setMatrixCharacteristics(MatrixCharacteristics matrixCharacteristics) Set the metadata fields based on a DataCharacteristics object.- Parameters:
- matrixCharacteristics- the matrix metadata as a DataCharacteristics object
 
 - 
setNumColumnspublic void setNumColumns(Long numColumns) Set the number of columns- Parameters:
- numColumns- the number of columns
 
 - 
setNumNonZerospublic void setNumNonZeros(Long numNonZeros) Set the number of non-zero values- Parameters:
- numNonZeros- the number of non-zero values
 
 - 
setNumRowspublic void setNumRows(Long numRows) Set the number of rows- Parameters:
- numRows- the number of rows
 
 - 
setBlocksizepublic void setBlocksize(Integer blen) Set the number of rows per block- Parameters:
- blen- the number of rows/cols per block
 
 
- 
 
-