|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.physics.nuclear.kinematics.math.Matrix
public class Matrix
DOCUMENT ME!
| Field Summary | |
|---|---|
int |
columns
DOCUMENT ME! |
double[][] |
element
DOCUMENT ME! |
int |
rows
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
Matrix(double d)
Creates a new Matrix object. |
|
Matrix(double x,
Matrix m,
char code)
Creates a new Matrix object. |
|
Matrix(int r,
int c)
Creates a new Matrix object. |
|
Matrix(int r,
int c,
char code)
Creates a new Matrix object. |
|
Matrix(int r,
int c,
double fill)
Creates a new Matrix object. |
|
Matrix(Matrix m)
Creates a new Matrix object. |
|
Matrix(Matrix m1,
Matrix m2,
char code)
Create a matrix by adding, subtracting, multiplying or solving a linear... |
|
Matrix(java.lang.String s)
Creates a new Matrix object. |
|
| Method Summary | |
|---|---|
double |
average()
DOCUMENT ME! |
java.util.List |
genp()
returns the LU decomposition of a matrix using the Gauss transform. |
java.util.List |
gepp()
Returns the LU decomposition of a matrix using the Gauss transform. |
double |
leig(double p)
Elementary QR method method to find the spectral radius of a positive valued matrix. |
Matrix |
lr(int iter)
Very basic LR eigenvalue method (no pivot) for illustration only. |
double |
max()
DOCUMENT ME! |
double |
norm()
DOCUMENT ME! |
Matrix |
order()
DOCUMENT ME! |
Matrix |
permute(int a1,
int a2,
char c)
DOCUMENT ME! |
Matrix |
Q()
DOCUMENT ME! |
java.util.List |
qr()
DOCUMENT ME! |
Matrix |
qreig(int iter)
Super basic QR eigenvalue method (example use only) Since this method uses the Householder-QR, it is O(n^3) and not too efficient. |
Matrix |
R()
DOCUMENT ME! |
void |
rowMultiply(int row,
double factor)
DOCUMENT ME! |
Matrix |
sort()
DOCUMENT ME! |
Matrix |
sub(int r1,
int r2,
int c1,
int c2)
DOCUMENT ME! |
double |
sum()
DOCUMENT ME! |
double |
sumSquares()
DOCUMENT ME! |
java.util.List |
toHess()
Makes the matrix upper Hessenberg via Householder rotations |
java.lang.String |
toString(int d)
DOCUMENT ME! |
java.lang.String |
toStringUL(int d)
DOCUMENT ME! |
Matrix |
transpose()
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int rows
public int columns
public double[][] element
| Constructor Detail |
|---|
public Matrix(int r,
int c)
r - DOCUMENT ME!c - DOCUMENT ME!public Matrix(double d)
d - DOCUMENT ME!
public Matrix(Matrix m1,
Matrix m2,
char code)
m1 - left matrixm2 - right matrixcode - '+' for add, '-' for subtract, '*' for multiply, '\\' for solving by decomposition
public Matrix(double x,
Matrix m,
char code)
x - DOCUMENT ME!m - DOCUMENT ME!code - DOCUMENT ME!
public Matrix(int r,
int c,
double fill)
r - DOCUMENT ME!c - DOCUMENT ME!fill - DOCUMENT ME!public Matrix(Matrix m)
m - DOCUMENT ME!
public Matrix(int r,
int c,
char code)
r - DOCUMENT ME!c - DOCUMENT ME!code - DOCUMENT ME!public Matrix(java.lang.String s)
s - DOCUMENT ME!| Method Detail |
|---|
public Matrix transpose()
public Matrix sub(int r1,
int r2,
int c1,
int c2)
r1 - DOCUMENT ME!r2 - DOCUMENT ME!c1 - DOCUMENT ME!c2 - DOCUMENT ME!
public Matrix permute(int a1,
int a2,
char c)
a1 - index of row or column to swapa2 - index of row or column to swapc - 'c' if swapping columns, 'r' if
swapping rows
public double norm()
public double max()
public double sum()
public double average()
public double sumSquares()
public Matrix Q()
public Matrix R()
public java.util.List qr()
public java.util.List toHess()
public java.util.List genp()
public java.util.List gepp()
public Matrix lr(int iter)
iter - number of iterations
public Matrix qreig(int iter)
iter -
public double leig(double p)
p - precision desired. For example, if A is a Matrix of positive
real numbers, then A.leig(0.01) returns the largest eigenvalue
to at least two digits of accuracy.
public java.lang.String toString(int d)
d - DOCUMENT ME!
public java.lang.String toStringUL(int d)
d - DOCUMENT ME!
public Matrix sort()
public Matrix order()
public void rowMultiply(int row,
double factor)
row - DOCUMENT ME!factor - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||