|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
ObjectMatrix
ElemMatrix
TMatrix
The class of transposition matrices: square matrices with 1's on the diagonal and a single non-zero off-diagonal entry.
| Constructor Summary | |
TMatrix(int i,
int j,
SparseElt val)
Constructor. |
|
| 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 TMatrix(int i,
int j,
SparseElt val)
val - The value in the i,j position. Its index is
ignored.
IllegalArgumentException - If i =
j, or val is null or zero.| Method Detail |
public final int det()
ElemMatrixint ±1.
det in class ElemMatrix
public final 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. If
b is a DenseMatrixZ, expect ClassCastExceptions unless the off-diagonal entry of
this is a SparseEltZ.
mult in class Matrixpublic Matrix multOnRight(Matrix b)
b is a CSparse or DenseMatrixZ,
is destructive to it; otherwise is unsupported. If
b is a DenseMatrixZ, expect ClassCastExceptions unless the off-diagonal entry of
this is a SparseEltZ.
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 | ||||||||||