org.jmatrices.dbl.rowcoltr
Class ColumnTransformer

java.lang.Object
  extended byorg.jmatrices.dbl.rowcoltr.ColumnTransformer

public final class ColumnTransformer
extends java.lang.Object

ColumnTransformer captures the operations that can be carried out on columns of a matrix

Given a matrix of dimension mxn M -yields-> R ,where R is a row vector of dimension 1xn.

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

Author: purangp

Date: 07.03.2004 Time: 20:46:52


Method Summary
static Matrix applyColumnOperation(Matrix m, ColumnTransformation co)
          

this is an open thought of trying to make column operations eleganter and perhaps faster Check out the "see also" section

static Matrix max(Matrix m)
          Gets the maximum element in a column and returns the selected as a row vector
static Matrix mean(Matrix m, boolean adjustment)
          Gets the means of all the elements in a column and returns them as a row vector 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 colum
static Matrix min(Matrix m)
          Gets the minimum element in a column and returns the selected as a row vector
static Matrix product(Matrix m)
          Multiplies up all the elements in a column and returns them as a row vector
static Matrix sum(Matrix m)
          Sums up all the columns and returns them as a row vector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

applyColumnOperation

public static Matrix applyColumnOperation(Matrix m,
                                          ColumnTransformation co)

this is an open thought of trying to make column operations eleganter and perhaps faster Check out the "see also" section

Parameters:
m -
co -
Returns:
See Also:
ColumnTransformation

sum

public static Matrix sum(Matrix m)
Sums up all the columns and returns them as a row vector

Parameters:
m - Matrix
Returns:
r(1xn) row vector with column sums

product

public static Matrix product(Matrix m)
Multiplies up all the elements in a column and returns them as a row vector

Parameters:
m - Matrix
Returns:
r(1xn) row vector with column product

mean

public static Matrix mean(Matrix m,
                          boolean adjustment)
Gets the means of all the elements in a column and returns them as a row vector

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 colum

Parameters:
m - Matrix
adjustment - true or false
Returns:
r(1xn) row vector with column means

max

public static Matrix max(Matrix m)
Gets the maximum element in a column and returns the selected as a row vector

Parameters:
m - Matrix
Returns:
r(1xn) row vector with column's maximum values

min

public static Matrix min(Matrix m)
Gets the minimum element in a column and returns the selected as a row vector

Parameters:
m - Matrix
Returns:
r(1xn) row vector with column's minimum values