Package org.jpmml.evaluator
Class MatrixUtil
- java.lang.Object
-
- org.jpmml.evaluator.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.RealMatrixasRealMatrix(org.dmg.pmml.Matrix matrix)static intgetColumns(org.dmg.pmml.Matrix matrix)static java.lang.NumbergetElementAt(org.dmg.pmml.Matrix matrix, int row, int column)static intgetRows(org.dmg.pmml.Matrix matrix)
-
-
-
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 is1.column- The column index. The index of the first column is1.- 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.
-
-