Class MatrixUtil


  • public class MatrixUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.commons.math3.linear.RealMatrix asRealMatrix​(org.dmg.pmml.Matrix matrix)  
      static int getColumns​(org.dmg.pmml.Matrix matrix)  
      static java.lang.Number getElementAt​(org.dmg.pmml.Matrix matrix, int row, int column)  
      static int getRows​(org.dmg.pmml.Matrix matrix)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • asRealMatrix

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

        public static java.lang.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:
        java.lang.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.