edu.ucla.stat.SOCR.util
Class Matrix

java.lang.Object
  extended by edu.ucla.stat.SOCR.util.Matrix

public class Matrix
extends java.lang.Object


Field Summary
 int columns
           
 double[][] element
           
 int rows
           
 
Constructor Summary
Matrix()
           
Matrix(double d)
           
Matrix(int r, int c)
           
Matrix(int r, int c, char code)
           
Matrix(int r, int c, double fill)
           
Matrix(int r, int c, double[][] fill)
           
Matrix(javax.swing.JTable dataTable)
           
Matrix(Matrix m)
           
Matrix(java.lang.String s)
           
 
Method Summary
static Matrix add(Matrix m1, Matrix m2)
           
 Matrix appendCols(Matrix x)
           
 Matrix appendRows(Matrix x)
           
 double average()
           
 Matrix diag()
           
static Matrix divide(Matrix m1, Matrix m2)
           
static Matrix eliminationGaussJordan(Matrix matrixInput)
           
 Matrix fliplr()
           
 Matrix flipud()
           
 java.util.Vector<Matrix> gepp()
           
 double[] getColumn(int j)
           
static Matrix inverse(Matrix matrix)
           
 double leig(double p)
           
static void main(java.lang.String[] args)
           
 double max()
           
static Matrix multiply(double d, Matrix m1)
           
static Matrix multiply(Matrix m1, Matrix m2)
           
 double norm()
           
 Matrix order()
           
 Matrix permute(int a1, int a2, char c)
           
static void print(Matrix matrix)
           
 Matrix Q()
           
 java.util.Vector<Matrix> qr()
           
 Matrix R()
           
 Matrix sort()
           
 Matrix sub(int r1, int r2, int c1, int c2)
           
static Matrix subtract(Matrix m1, Matrix m2)
           
 double sum()
           
 double sumSquares()
           
 java.util.Vector<Matrix> toHess()
           
 java.lang.String toString()
           
 java.lang.String toString(int d)
           
 Matrix transpose()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rows

public int rows

columns

public int columns

element

public double[][] element
Constructor Detail

Matrix

public Matrix()

Matrix

public Matrix(int r,
              int c)

Matrix

public Matrix(javax.swing.JTable dataTable)

Matrix

public Matrix(double d)

Matrix

public Matrix(int r,
              int c,
              double fill)

Matrix

public Matrix(int r,
              int c,
              double[][] fill)

Matrix

public Matrix(Matrix m)

Matrix

public Matrix(int r,
              int c,
              char code)

Matrix

public Matrix(java.lang.String s)
Method Detail

transpose

public Matrix transpose()

diag

public Matrix diag()

add

public static Matrix add(Matrix m1,
                         Matrix m2)

getColumn

public double[] getColumn(int j)

subtract

public static Matrix subtract(Matrix m1,
                              Matrix m2)

multiply

public static Matrix multiply(double d,
                              Matrix m1)

multiply

public static Matrix multiply(Matrix m1,
                              Matrix m2)

divide

public static Matrix divide(Matrix m1,
                            Matrix m2)

inverse

public static Matrix inverse(Matrix matrix)

eliminationGaussJordan

public static Matrix eliminationGaussJordan(Matrix matrixInput)

sub

public Matrix sub(int r1,
                  int r2,
                  int c1,
                  int c2)

appendCols

public Matrix appendCols(Matrix x)

appendRows

public Matrix appendRows(Matrix x)

flipud

public Matrix flipud()

fliplr

public Matrix fliplr()

permute

public Matrix permute(int a1,
                      int a2,
                      char c)

norm

public double norm()

max

public double max()

sum

public double sum()

average

public double average()

sumSquares

public double sumSquares()

Q

public Matrix Q()

R

public Matrix R()

qr

public java.util.Vector<Matrix> qr()

toHess

public java.util.Vector<Matrix> toHess()

gepp

public java.util.Vector<Matrix> gepp()

leig

public double leig(double p)

toString

public java.lang.String toString(int d)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

sort

public Matrix sort()

order

public Matrix order()

print

public static void print(Matrix matrix)

main

public static void main(java.lang.String[] args)