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 Summary

    Constructors
    Constructor and Description
    `Metadata()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MatrixCharacteristics` | `asMatrixCharacteristics()` Convert the metadata to a DataCharacteristics object.
    `Integer` | `getBlocksize()` Obtain the number of rows/cols per block
    `Long` | `getNumColumns()` Obtain the number of columns
    `Long` | `getNumNonZeros()` Obtain the number of non-zero values
    `Long` | `getNumRows()` Obtain the number of rows
    `void` | `setBlocksize(Integer blen)` Set the number of rows per block
    `void` | `setMatrixCharacteristics(MatrixCharacteristics matrixCharacteristics)` Set the metadata fields based on a DataCharacteristics object.
    `void` | `setNumColumns(Long numColumns)` Set the number of columns
    `void` | `setNumNonZeros(Long numNonZeros)` Set the number of non-zero values
    `void` | `setNumRows(Long numRows)` Set the number of rows
    `String` | `toString()`

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Metadata

          public Metadata()

  - ### Method Detail

    - #### asMatrixCharacteristics

          public MatrixCharacteristics asMatrixCharacteristics()

      Convert the metadata to a DataCharacteristics object. If all field values are `null`, `null` is returned.
      Returns:
        the metadata as a DataCharacteristics object, or `null` if all field values are null

    - #### getNumColumns

          public Long getNumColumns()

      Obtain the number of columns
      Returns:
        the number of columns

    - #### getNumNonZeros

          public Long getNumNonZeros()

      Obtain the number of non-zero values
      Returns:
        the number of non-zero values

    - #### getNumRows

          public Long getNumRows()

      Obtain the number of rows
      Returns:
        the number of rows

    - #### getBlocksize

          public Integer getBlocksize()

      Obtain the number of rows/cols per block
      Returns:
        the number of rows/cols per block

    - #### setMatrixCharacteristics

          public void setMatrixCharacteristics(MatrixCharacteristics matrixCharacteristics)

      Set the metadata fields based on a DataCharacteristics object.
      Parameters:
        `matrixCharacteristics` - the matrix metadata as a DataCharacteristics object

    - #### setNumColumns

          public void setNumColumns(Long numColumns)

      Set the number of columns
      Parameters:
        `numColumns` - the number of columns

    - #### setNumNonZeros

          public void setNumNonZeros(Long numNonZeros)

      Set the number of non-zero values
      Parameters:
        `numNonZeros` - the number of non-zero values

    - #### setNumRows

          public void setNumRows(Long numRows)

      Set the number of rows
      Parameters:
        `numRows` - the number of rows

    - #### setBlocksize

          public void setBlocksize(Integer blen)

      Set the number of rows per block
      Parameters:
        `blen` - the number of rows/cols per block

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2020 The Apache Software Foundation. All rights reserved.