Class MatrixUtil


  • public class MatrixUtil
    extends Object
    • Method Detail

      • asRealMatrix

        public static org.apache.commons.math3.linear.RealMatrix asRealMatrix​(org.dmg.pmml.Matrix matrix)
      • getElementAt

        public static Number getElementAt​(org.dmg.pmml.Matrix matrix,
                                          int row,
                                          int column)
        Parameters:
        row - The row index. The index of the first row is 1.
        column - The column index. The index of the first column is 1.
        Returns:
        The element at the specified location, or null.
        Throws:
        IndexOutOfBoundsException - If either the row or column index is out of range.
      • getRows

        public static int getRows​(org.dmg.pmml.Matrix matrix)
        Returns:
        The number of rows.
      • getColumns

        public static int getColumns​(org.dmg.pmml.Matrix matrix)
        Returns:
        The number of columns.