Package mgui.geometry.util
Class MatrixFunctions
java.lang.Object
mgui.interfaces.Utility
mgui.geometry.util.MatrixFunctions
public class MatrixFunctions extends Utility
Utility class providing functions on Jama matrices.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Constructor Summary
Constructors Constructor Description MatrixFunctions()
-
Method Summary
Modifier and Type Method Description static java.util.ArrayList<java.lang.Double>
getColumnMaxes(Jama.Matrix M)
Returns the maximums of the columns of M.static java.util.ArrayList<java.lang.Double>
getColumnMeans(Jama.Matrix M)
Returns the means of the columns of M.static java.util.ArrayList<java.lang.Double>
getColumnMins(Jama.Matrix M)
Returns the minimums of the columns of M.static java.util.ArrayList<java.lang.Double>
getColumns(Jama.Matrix M, int col)
Returnscol
as anArrayList
.static java.util.ArrayList<java.lang.Double>
getColumnSums(Jama.Matrix M)
Returns the sums of the columns of M.static double
getMaxForColumn(Jama.Matrix M, int col)
Returns the maximum ofcol
.static double
getMaxForRow(Jama.Matrix M, int row)
Returns the maximum ofrow
.static double
getMeanForColumn(Jama.Matrix M, int col)
Returns the mean ofcol
.static double
getMeanForRow(Jama.Matrix M, int row)
Returns the mean ofrow
.static double
getMinForColumn(Jama.Matrix M, int col)
Returns the minimum ofcol
.static double
getMinForRow(Jama.Matrix M, int row)
Returns the minimum ofrow
.static java.util.ArrayList<java.lang.Double>
getRow(Jama.Matrix M, int row)
Returnsrow
as anArrayList
.static java.util.ArrayList<java.lang.Double>
getRowMaxes(Jama.Matrix M)
Returns the maximums of the rows of M.static java.util.ArrayList<java.lang.Double>
getRowMeans(Jama.Matrix M)
Returns the means of the rows of M.static java.util.ArrayList<java.lang.Double>
getRowMins(Jama.Matrix M)
Returns the minimums of the rows of M.static java.util.ArrayList<java.lang.Double>
getRowSums(Jama.Matrix M)
Returns the sums of the rows of M.static double
getSumForColumn(Jama.Matrix M, int col)
Returns the sum ofcol
.static double
getSumForRow(Jama.Matrix M, int row)
Returns the sum ofrow
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MatrixFunctions
public MatrixFunctions()
-
-
Method Details
-
getRow
public static java.util.ArrayList<java.lang.Double> getRow(Jama.Matrix M, int row)Returnsrow
as anArrayList
.- Parameters:
M
-row
-- Returns:
-
getColumns
public static java.util.ArrayList<java.lang.Double> getColumns(Jama.Matrix M, int col)Returnscol
as anArrayList
.- Parameters:
M
-row
-- Returns:
-
getMaxForRow
public static double getMaxForRow(Jama.Matrix M, int row)Returns the maximum ofrow
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getRowMaxes
public static java.util.ArrayList<java.lang.Double> getRowMaxes(Jama.Matrix M)Returns the maximums of the rows of M.- Parameters:
M
- A 2D matrix- Returns:
-
getMaxForColumn
public static double getMaxForColumn(Jama.Matrix M, int col)Returns the maximum ofcol
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getColumnMaxes
public static java.util.ArrayList<java.lang.Double> getColumnMaxes(Jama.Matrix M)Returns the maximums of the columns of M.- Parameters:
M
- A 2D matrix- Returns:
-
getMinForRow
public static double getMinForRow(Jama.Matrix M, int row)Returns the minimum ofrow
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getRowMins
public static java.util.ArrayList<java.lang.Double> getRowMins(Jama.Matrix M)Returns the minimums of the rows of M.- Parameters:
M
- A 2D matrix- Returns:
-
getMinForColumn
public static double getMinForColumn(Jama.Matrix M, int col)Returns the minimum ofcol
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getColumnMins
public static java.util.ArrayList<java.lang.Double> getColumnMins(Jama.Matrix M)Returns the minimums of the columns of M.- Parameters:
M
- A 2D matrix- Returns:
-
getMeanForRow
public static double getMeanForRow(Jama.Matrix M, int row)Returns the mean ofrow
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getRowMeans
public static java.util.ArrayList<java.lang.Double> getRowMeans(Jama.Matrix M)Returns the means of the rows of M.- Parameters:
M
- A 2D matrix- Returns:
-
getMeanForColumn
public static double getMeanForColumn(Jama.Matrix M, int col)Returns the mean ofcol
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getColumnMeans
public static java.util.ArrayList<java.lang.Double> getColumnMeans(Jama.Matrix M)Returns the means of the columns of M.- Parameters:
M
- A 2D matrix- Returns:
-
getSumForRow
public static double getSumForRow(Jama.Matrix M, int row)Returns the sum ofrow
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getRowSums
public static java.util.ArrayList<java.lang.Double> getRowSums(Jama.Matrix M)Returns the sums of the rows of M.- Parameters:
M
- A 2D matrix- Returns:
-
getSumForColumn
public static double getSumForColumn(Jama.Matrix M, int col)Returns the sum ofcol
.- Parameters:
M
- A 2D matrixrow
-- Returns:
-
getColumnSums
public static java.util.ArrayList<java.lang.Double> getColumnSums(Jama.Matrix M)Returns the sums of the columns of M.- Parameters:
M
- A 2D matrix- Returns:
-