|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
ObjectMatrix
ElemMatrix
P2Matrix
The class of n × n permutation matrices of order two.
| Constructor Summary | |
P2Matrix(int i,
int j)
Constructs a square matrix with entries i,j and j,i equal to 1, with k,k equal to 1 for all k different from both of i,j, and with 0's elsewhere. |
|
| Method Summary | |
int |
det()
The determinant, as an int ±1. |
SparseElt |
get(int i0,
int j0)
Returns a SparseElt whose value is the i,j value
of the matrix. |
Matrix |
inverse()
Check the implementation for whether it's supported, and whether it's destructive. |
boolean |
isIdentity()
Whether this is an n × n identity matrix. |
Matrix |
mult(Matrix b)
If b is a CSparse or DenseMatrixZ,
is destructive to it; otherwise is unsupported. |
Matrix |
multOnRight(Matrix b)
If b is a CSparse or DenseMatrixZ,
is destructive to it; otherwise is unsupported. |
String |
toString()
Formats the matrix with each column left-justified. |
Matrix |
transpose()
Non-destructive. |
| Methods inherited from class ElemMatrix |
add, getNumCols, getNumRows, isProductZero, isZero, set |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public P2Matrix(int i,
int j)
IllegalArgumentException - If i = j.| Method Detail |
public final int det()
ElemMatrixint ±1.
det in class ElemMatrix
public SparseElt get(int i0,
int j0)
MatrixSparseElt whose value is the i,j value
of the matrix. May return null for a zero entry. The index of
the SparseElt is unspecified--there is no guarantee it is
either i or j.
get in class Matrixpublic final Matrix inverse()
Matrix
inverse in class Matrixpublic final boolean isIdentity()
Matrix
isIdentity in class Matrixpublic Matrix mult(Matrix b)
b is a CSparse or DenseMatrixZ,
is destructive to it; otherwise is unsupported.
mult in class Matrixpublic Matrix multOnRight(Matrix b)
b is a CSparse or DenseMatrixZ,
is destructive to it; otherwise is unsupported.
multOnRight in class ElemMatrixMatrix.mult(shh.csparse.Matrix)public String toString()
Matrix
toString in class Matrixpublic final Matrix transpose()
Matrix
transpose in class Matrix
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||