org.jmatrices.dbl.rowcoltr
Class RowTransformer

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

public final class RowTransformer
extends java.lang.Object

RowTransformer captures the operations that can be carried out on rows of a matrix

Given a matrix of dimension mxn M -yields-> C ,where C is a column vector of dimension mx1.

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

Author: purangp

Date: 07.03.2004 Time: 20:37:21


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

Method Detail

sum

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

Parameters:
m - Matrix
Returns:
c(mx1) column vector with row sums

product

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

Parameters:
m - Matrix
Returns:
c(mx1) column vector with row products

mean

public static Matrix mean(Matrix m,
                          boolean adjustment)
Gets the means of all the elements in a row and returns them as a column 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 row

Parameters:
m - Matrix
adjustment - true or false
Returns:
c(mx1) column vector with row means

max

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

Parameters:
m - Matrix
Returns:
c(mx1) column vector with row'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:
c(mx1) column vector with rows's minimum values