org.apache.sysml.api.mlcontext

Class MatrixMetadata



  • public class MatrixMetadata
    extends Metadata
    Matrix metadata, such as the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in the matrix.
    • Constructor Summary

      Constructors 
      Constructor and Description
      MatrixMetadata() 
      MatrixMetadata(int numRows, int numColumns)
      Constructor to create a MatrixMetadata object based on the number of rows and the number of columns in a matrix.
      MatrixMetadata(int numRows, int numColumns, int numNonZeros)
      Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, and the number of non-zero values in a matrix.
      MatrixMetadata(int numRows, int numColumns, int numRowsPerBlock, int numColumnsPerBlock)
      Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of rows per block, and the number of columns per block in a matrix.
      MatrixMetadata(int numRows, int numColumns, int numNonZeros, int numRowsPerBlock, int numColumnsPerBlock)
      Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
      MatrixMetadata(Long numRows, Long numColumns)
      Constructor to create a MatrixMetadata object based on the number of rows and the number of columns in a matrix.
      MatrixMetadata(Long numRows, Long numColumns, Integer numRowsPerBlock, Integer numColumnsPerBlock)
      Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of rows per block, and the number of columns per block in a matrix.
      MatrixMetadata(Long numRows, Long numColumns, Long numNonZeros)
      Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, and the number of non-zero values in a matrix.
      MatrixMetadata(Long numRows, Long numColumns, Long numNonZeros, Integer numRowsPerBlock, Integer numColumnsPerBlock)
      Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
      MatrixMetadata(MatrixCharacteristics matrixCharacteristics)
      Constructor to create a MatrixMetadata object based on a MatrixCharacteristics object.
      MatrixMetadata(MatrixFormat matrixFormat)
      Constructor to create a MatrixMetadata object based on matrix format.
      MatrixMetadata(MatrixFormat matrixFormat, int numRows, int numColumns)
      Constructor to create a MatrixMetadata object based on matrix format, the number of rows, and the number of columns in a matrix.
      MatrixMetadata(MatrixFormat matrixFormat, int numRows, int numColumns, int numNonZeros)
      Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, and the number of non-zero values in a matrix.
      MatrixMetadata(MatrixFormat matrixFormat, int numRows, int numColumns, int numNonZeros, int numRowsPerBlock, int numColumnsPerBlock)
      Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
      MatrixMetadata(MatrixFormat matrixFormat, Long numRows, Long numColumns)
      Constructor to create a MatrixMetadata object based on matrix format, the number of rows, and the number of columns in a matrix.
      MatrixMetadata(MatrixFormat matrixFormat, Long numRows, Long numColumns, Long numNonZeros)
      Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, and the number of non-zero values in a matrix.
      MatrixMetadata(MatrixFormat matrixFormat, Long numRows, Long numColumns, Long numNonZeros, Integer numRowsPerBlock, Integer numColumnsPerBlock)
      Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
    • Constructor Detail

      • MatrixMetadata

        public MatrixMetadata()
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat)
        Constructor to create a MatrixMetadata object based on matrix format.
        Parameters:
        matrixFormat - The matrix format.
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat,
                              Long numRows,
                              Long numColumns)
        Constructor to create a MatrixMetadata object based on matrix format, the number of rows, and the number of columns in a matrix.
        Parameters:
        matrixFormat - The matrix format.
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat,
                              int numRows,
                              int numColumns)
        Constructor to create a MatrixMetadata object based on matrix format, the number of rows, and the number of columns in a matrix.
        Parameters:
        matrixFormat - The matrix format.
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat,
                              Long numRows,
                              Long numColumns,
                              Long numNonZeros)
        Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, and the number of non-zero values in a matrix.
        Parameters:
        matrixFormat - The matrix format.
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat,
                              int numRows,
                              int numColumns,
                              int numNonZeros)
        Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, and the number of non-zero values in a matrix.
        Parameters:
        matrixFormat - The matrix format.
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat,
                              Long numRows,
                              Long numColumns,
                              Long numNonZeros,
                              Integer numRowsPerBlock,
                              Integer numColumnsPerBlock)
        Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
        Parameters:
        matrixFormat - The matrix format.
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
        numRowsPerBlock - The number of rows per block in the matrix.
        numColumnsPerBlock - The number of columns per block in the matrix.
      • MatrixMetadata

        public MatrixMetadata(MatrixFormat matrixFormat,
                              int numRows,
                              int numColumns,
                              int numNonZeros,
                              int numRowsPerBlock,
                              int numColumnsPerBlock)
        Constructor to create a MatrixMetadata object based on matrix format, the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
        Parameters:
        matrixFormat - The matrix format.
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
        numRowsPerBlock - The number of rows per block in the matrix.
        numColumnsPerBlock - The number of columns per block in the matrix.
      • MatrixMetadata

        public MatrixMetadata(Long numRows,
                              Long numColumns)
        Constructor to create a MatrixMetadata object based on the number of rows and the number of columns in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
      • MatrixMetadata

        public MatrixMetadata(int numRows,
                              int numColumns)
        Constructor to create a MatrixMetadata object based on the number of rows and the number of columns in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
      • MatrixMetadata

        public MatrixMetadata(Long numRows,
                              Long numColumns,
                              Long numNonZeros)
        Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, and the number of non-zero values in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
      • MatrixMetadata

        public MatrixMetadata(int numRows,
                              int numColumns,
                              int numNonZeros)
        Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, and the number of non-zero values in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
      • MatrixMetadata

        public MatrixMetadata(Long numRows,
                              Long numColumns,
                              Integer numRowsPerBlock,
                              Integer numColumnsPerBlock)
        Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of rows per block, and the number of columns per block in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numRowsPerBlock - The number of rows per block in the matrix.
        numColumnsPerBlock - The number of columns per block in the matrix.
      • MatrixMetadata

        public MatrixMetadata(int numRows,
                              int numColumns,
                              int numRowsPerBlock,
                              int numColumnsPerBlock)
        Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of rows per block, and the number of columns per block in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numRowsPerBlock - The number of rows per block in the matrix.
        numColumnsPerBlock - The number of columns per block in the matrix.
      • MatrixMetadata

        public MatrixMetadata(Long numRows,
                              Long numColumns,
                              Long numNonZeros,
                              Integer numRowsPerBlock,
                              Integer numColumnsPerBlock)
        Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
        numRowsPerBlock - The number of rows per block in the matrix.
        numColumnsPerBlock - The number of columns per block in the matrix.
      • MatrixMetadata

        public MatrixMetadata(int numRows,
                              int numColumns,
                              int numNonZeros,
                              int numRowsPerBlock,
                              int numColumnsPerBlock)
        Constructor to create a MatrixMetadata object based on the number of rows, the number of columns, the number of non-zero values, the number of rows per block, and the number of columns per block in a matrix.
        Parameters:
        numRows - The number of rows in the matrix.
        numColumns - The number of columns in the matrix.
        numNonZeros - The number of non-zero values in the matrix.
        numRowsPerBlock - The number of rows per block in the matrix.
        numColumnsPerBlock - The number of columns per block in the matrix.
      • MatrixMetadata

        public MatrixMetadata(MatrixCharacteristics matrixCharacteristics)
        Constructor to create a MatrixMetadata object based on a MatrixCharacteristics object.
        Parameters:
        matrixCharacteristics - the matrix metadata as a MatrixCharacteristics object
    • Method Detail

      • setMatrixCharacteristics

        public void setMatrixCharacteristics(MatrixCharacteristics matrixCharacteristics)
        Set the MatrixMetadata fields based on a MatrixCharacteristics object.
        Parameters:
        matrixCharacteristics - the matrix metadata as a MatrixCharacteristics object
      • getNumRows

        public Long getNumRows()
        Obtain the number of rows
        Returns:
        the number of rows
      • setNumRows

        public void setNumRows(Long numRows)
        Set the number of rows
        Parameters:
        numRows - the number of rows
      • getNumColumns

        public Long getNumColumns()
        Obtain the number of columns
        Returns:
        the number of columns
      • setNumColumns

        public void setNumColumns(Long numColumns)
        Set the number of columns
        Parameters:
        numColumns - the number of columns
      • getNumNonZeros

        public Long getNumNonZeros()
        Obtain the number of non-zero values
        Returns:
        the number of non-zero values
      • setNumNonZeros

        public void setNumNonZeros(Long numNonZeros)
        Set the number of non-zero values
        Parameters:
        numNonZeros - the number of non-zero values
      • getNumRowsPerBlock

        public Integer getNumRowsPerBlock()
        Obtain the number of rows per block
        Returns:
        the number of rows per block
      • setNumRowsPerBlock

        public void setNumRowsPerBlock(Integer numRowsPerBlock)
        Set the number of rows per block
        Parameters:
        numRowsPerBlock - the number of rows per block
      • getNumColumnsPerBlock

        public Integer getNumColumnsPerBlock()
        Obtain the number of columns per block
        Returns:
        the number of columns per block
      • setNumColumnsPerBlock

        public void setNumColumnsPerBlock(Integer numColumnsPerBlock)
        Set the number of columns per block
        Parameters:
        numColumnsPerBlock - the number of columns per block
      • asMatrixCharacteristics

        public MatrixCharacteristics asMatrixCharacteristics()
        Convert the matrix metadata to a MatrixCharacteristics object. If all field values are null, null is returned.
        Returns:
        the matrix metadata as a MatrixCharacteristics object, or null if all field values are null
      • getMatrixFormat

        public MatrixFormat getMatrixFormat()
        Obtain the matrix format
        Returns:
        the matrix format
      • setMatrixFormat

        public void setMatrixFormat(MatrixFormat matrixFormat)
        Set the matrix format
        Parameters:
        matrixFormat - the matrix format

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