|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthep.physics.matrix.MatrixOp
public class MatrixOp
Simple operations on matrices
| Nested Class Summary | |
|---|---|
static class |
MatrixOp.IndeterminateMatrixException
|
static class |
MatrixOp.InvalidMatrixException
|
| Method Summary | |
|---|---|
static Matrix |
add(Matrix a,
Matrix b)
Add two matrices together. |
static Hep3Vector |
as3Vector(Matrix m)
Convenience method to turn a 3 row column matrix into a vector. |
static double |
det(Matrix mIn)
|
static Matrix |
getSubMatrix(Matrix m,
int row,
int col,
int nrow,
int ncol)
Extract part of a matrix. |
static Matrix |
inverse(Matrix m)
Convenience method to invert a matrix in one step. |
static void |
inverse(Matrix mIn,
MutableMatrix mOut)
Invert matrix mIn and write it to matrix mOut. |
static Matrix |
mult(double c,
Matrix m)
Multiply a matrix by a scaler constant. |
static Matrix |
mult(Matrix m1,
Matrix m2)
|
static void |
setSubMatrix(MutableMatrix mat,
Matrix sub,
int row,
int col)
Fill in part of a matrix with the contents of another matrix. |
static Matrix |
sub(Matrix a,
Matrix b)
Subtract matrix b from matrix a. |
static java.lang.String |
toString(Matrix m)
|
static Matrix |
transposed(Matrix m)
Returns the transpose of the matrix. |
static void |
transposed(Matrix mIn,
MutableMatrix mOut)
Traspose matrix mIn and write it to matrix mOut. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void inverse(Matrix mIn,
MutableMatrix mOut)
throws MatrixOp.InvalidMatrixException
inverse(this,this);
This method currently only supports square matrices.
MatrixOp.InvalidMatrixExceptionpublic static Matrix inverse(Matrix m)
m - matrix to be inverted. This remains unchanged by this operation
public static java.lang.String toString(Matrix m)
public static double det(Matrix mIn)
public static void transposed(Matrix mIn,
MutableMatrix mOut)
transposed(this,this);
public static Matrix transposed(Matrix m)
m - matrix to be transposed
public static Matrix mult(Matrix m1,
Matrix m2)
public static Matrix add(Matrix a,
Matrix b)
a - first matrixb - second matrix
public static Matrix sub(Matrix a,
Matrix b)
a - starting matrixb - matrix to be subtracted
public static Matrix mult(double c,
Matrix m)
c - constant that will mutliply the matrixm - matrix to be scaled
public static void setSubMatrix(MutableMatrix mat,
Matrix sub,
int row,
int col)
mat - matrix to be modifiedsub - submatrix to be insertedrow - row where insertion is to take placecol - column where insertion is to take place
public static Matrix getSubMatrix(Matrix m,
int row,
int col,
int nrow,
int ncol)
m - matrix containing the desired submatrixrow - row where the submatrix is locatedcol - column where the submatrix is locatednrow - number of rows in the submatrixncol - number of columns in the submatrix
public static Hep3Vector as3Vector(Matrix m)
m - column matrix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||