us.ihmc.utilities.math
Class MatrixStatistics

java.lang.Object
  extended by us.ihmc.utilities.math.MatrixStatistics

public class MatrixStatistics
extends java.lang.Object


Nested Class Summary
static interface MatrixStatistics.ColumnHandler
           
static class MatrixStatistics.DoubleWrapper
           
static interface MatrixStatistics.ElementHandler
           
static interface MatrixStatistics.RowHandler
           
 
Constructor Summary
MatrixStatistics()
           
 
Method Summary
static com.mathworks.jama.Matrix createColumnVector(int numberOfRows)
           
static com.mathworks.jama.Matrix createColumnVector(int numberOfRows, double initialVal)
           
static com.mathworks.jama.Matrix createRowVector(int numberOfColumns)
           
static com.mathworks.jama.Matrix createRowVector(int numberOfColumns, double initialVal)
           
static com.mathworks.jama.Matrix divideEachRowByStdDevOfRow(com.mathworks.jama.Matrix m)
          divideEachRowByStdDevOfRow
static void forEachColumn(com.mathworks.jama.Matrix m, MatrixStatistics.ColumnHandler columnHandler)
           
static void forEachElement(com.mathworks.jama.Matrix m, MatrixStatistics.ElementHandler elementHandler)
           
static void forEachRow(com.mathworks.jama.Matrix m, MatrixStatistics.RowHandler rowHandler)
           
static com.mathworks.jama.Matrix getAverageColumnVector(com.mathworks.jama.Matrix m)
          get the mean of each row in the matrix
static com.mathworks.jama.Matrix getColumnNumber(int i, com.mathworks.jama.Matrix m)
           
static com.mathworks.jama.Matrix getCovarianceMatrix(com.mathworks.jama.Matrix m)
           
static com.mathworks.jama.Matrix getRowNumber(int i, com.mathworks.jama.Matrix m)
           
static com.mathworks.jama.Matrix getVarianceOfEachRow(com.mathworks.jama.Matrix m)
          get the variance of each row in the matrix
static int[] indecesOfMaxElement(com.mathworks.jama.Matrix m)
          Locates the Maximum element of a Matrix.
static com.mathworks.jama.Matrix subtractAverageColumnFromEachRow(com.mathworks.jama.Matrix m)
           
static double sumAllElements(com.mathworks.jama.Matrix m)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatrixStatistics

public MatrixStatistics()
Method Detail

indecesOfMaxElement

public static int[] indecesOfMaxElement(com.mathworks.jama.Matrix m)
Locates the Maximum element of a Matrix. Returns the indeces of that element

Parameters:
m - Matrix
Returns:
int[]

getCovarianceMatrix

public static com.mathworks.jama.Matrix getCovarianceMatrix(com.mathworks.jama.Matrix m)

subtractAverageColumnFromEachRow

public static com.mathworks.jama.Matrix subtractAverageColumnFromEachRow(com.mathworks.jama.Matrix m)

sumAllElements

public static double sumAllElements(com.mathworks.jama.Matrix m)

divideEachRowByStdDevOfRow

public static com.mathworks.jama.Matrix divideEachRowByStdDevOfRow(com.mathworks.jama.Matrix m)
divideEachRowByStdDevOfRow

Parameters:
m - Matrix
Returns:
Matrix

getVarianceOfEachRow

public static com.mathworks.jama.Matrix getVarianceOfEachRow(com.mathworks.jama.Matrix m)
get the variance of each row in the matrix

Parameters:
m - Matrix
Returns:
Matrix

getAverageColumnVector

public static com.mathworks.jama.Matrix getAverageColumnVector(com.mathworks.jama.Matrix m)
get the mean of each row in the matrix

Parameters:
m - Matrix
Returns:
Matrix

createColumnVector

public static com.mathworks.jama.Matrix createColumnVector(int numberOfRows,
                                                           double initialVal)

createRowVector

public static com.mathworks.jama.Matrix createRowVector(int numberOfColumns,
                                                        double initialVal)

createColumnVector

public static com.mathworks.jama.Matrix createColumnVector(int numberOfRows)

createRowVector

public static com.mathworks.jama.Matrix createRowVector(int numberOfColumns)

getRowNumber

public static com.mathworks.jama.Matrix getRowNumber(int i,
                                                     com.mathworks.jama.Matrix m)

getColumnNumber

public static com.mathworks.jama.Matrix getColumnNumber(int i,
                                                        com.mathworks.jama.Matrix m)

forEachElement

public static void forEachElement(com.mathworks.jama.Matrix m,
                                  MatrixStatistics.ElementHandler elementHandler)

forEachColumn

public static void forEachColumn(com.mathworks.jama.Matrix m,
                                 MatrixStatistics.ColumnHandler columnHandler)

forEachRow

public static void forEachRow(com.mathworks.jama.Matrix m,
                              MatrixStatistics.RowHandler rowHandler)