org.jmatrices.dbl.measure
Class MatrixMeasure

java.lang.Object
  extended byorg.jmatrices.dbl.measure.MatrixMeasure

public final class MatrixMeasure
extends java.lang.Object

MatrixMeasure provides important measures associated with a matrix

Given a matrix M -yields-> value ,where value is a number.

All operations on a matrix fitting this pattern can be found here!

Author: purangp

Date: 08.03.2004 Time: 00:09:12


Method Summary
static int breadth(Matrix m)
          Gets the breadth of the matrix, which is treated to be the minimum dimension.
static double getCondition(Matrix m)
          Gets the ratio of largest to smallest singular value.
static double getDeterminant(Matrix m)
          Gets the getDeterminant of a non-singular square matrix.
static double getMax(Matrix m)
          Gets the maximum value occuring in the matrix
static double getMean(Matrix m, boolean adjustment)
          Gets the mean or average of all the values adjustment- calculates the mean by dividing the sum of all values by (n-1) instead of n, which is the number of elements in the matrix
static double getMin(Matrix m)
          Gets the minimum value occuring in the matrix
static double getNorm1(Matrix m)
          Gets the maximum column sum
static double getNorm2(Matrix m)
          Gets the maximum singular value
static double getNormFrobenius(Matrix m)
          Gets the sqrt of sum of squares of all elements.
static double getNormInfinity(Matrix m)
          Gets the maximum row sum
static double getProduct(Matrix m)
          Gets the product of all values
static int getRank(Matrix m)
          Gets the rank of the matrix
static double getSum(Matrix m)
          Gets the sum of all values
static double getTrace(Matrix m)
          Gets the trace of the matrix
static int length(Matrix m)
          Gets the length of the matrix, which is treated to be the maximum dimension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDeterminant

public static double getDeterminant(Matrix m)
Gets the getDeterminant of a non-singular square matrix.
todo is the observation about non-singularity true?

Parameters:
m - Matrix
Returns:
detrminant

getTrace

public static double getTrace(Matrix m)
Gets the trace of the matrix

Parameters:
m - Matrix
Returns:
trace

getRank

public static int getRank(Matrix m)
Gets the rank of the matrix

Parameters:
m - Matrix
Returns:
rank

getMax

public static double getMax(Matrix m)
Gets the maximum value occuring in the matrix

Parameters:
m - Matrix
Returns:
maximum value

getMin

public static double getMin(Matrix m)
Gets the minimum value occuring in the matrix

Parameters:
m - Matrix
Returns:
minimum value

getSum

public static double getSum(Matrix m)
Gets the sum of all values

Parameters:
m - Matrix
Returns:
sum of all values

getProduct

public static double getProduct(Matrix m)
Gets the product of all values

Parameters:
m - Matrix
Returns:
product of all values

getMean

public static double getMean(Matrix m,
                             boolean adjustment)
Gets the mean or average of all the values

adjustment- calculates the mean by dividing the sum of all values by (n-1) instead of n, which is the number of elements in the matrix

Parameters:
m - Matrix
adjustment - true or false
Returns:
adjusted or unadjusted mean of all values

getNorm1

public static double getNorm1(Matrix m)
Gets the maximum column sum

Parameters:
m - Matrix
Returns:
maximum column sum

getNorm2

public static double getNorm2(Matrix m)
Gets the maximum singular value

Parameters:
m - Matrix
Returns:
maximum singular value

getNormInfinity

public static double getNormInfinity(Matrix m)
Gets the maximum row sum

Parameters:
m - Matrix
Returns:
maximum row sum

getNormFrobenius

public static double getNormFrobenius(Matrix m)
Gets the sqrt of sum of squares of all elements.

Parameters:
m - Matrix
Returns:
sqrt of sum of squares of all elements.

getCondition

public static double getCondition(Matrix m)
Gets the ratio of largest to smallest singular value.

Parameters:
m - Matrix
Returns:
ratio of largest to smallest singular value.

length

public static int length(Matrix m)
Gets the length of the matrix, which is treated to be the maximum dimension.

Parameters:
m -
Returns:
Math.max(m.rows(),m.cols())

breadth

public static int breadth(Matrix m)
Gets the breadth of the matrix, which is treated to be the minimum dimension.

Parameters:
m -
Returns:
Math.min(m.rows(),m.cols())