|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.math.matrix.Matrix
org.rubato.math.matrix.ZMatrix
public final class ZMatrix
Matrixes over integers.
Constructor Summary | |
---|---|
ZMatrix(int[] v)
Creates a nx1 integer matrix from the vector v ,
where n is the length of v . |
|
ZMatrix(int[][] c)
Creates a mxn integer matrix from the 2-dimensional array c of integers. |
|
ZMatrix(int rows,
int cols)
Creates an integer rows x cols matrix
with all coefficients set to 0. |
|
ZMatrix(int rows,
int cols,
int value)
Creates an integer rows x cols matrix
with all coefficients set to value . |
|
ZMatrix(ZMatrix m)
Creates a copy of the integer matrix m . |
|
ZMatrix(ZnMatrix m)
Creates an integer copy of the modular integer matrix m . |
Method Summary | |
---|---|
ZMatrix |
adjoint()
|
ZMatrix |
affineDifference()
|
int |
compareTo(Matrix object)
Compares this matrix to object . |
int |
determinant()
|
ZMatrix |
difference(ZMatrix m)
|
int |
dotProduct(ZMatrix m)
|
boolean |
equals(java.lang.Object object)
|
int |
euclidean()
Returns the Euclidean norm of this matrix. |
int |
get(int row,
int col)
Returns the value at index row ,col . |
ZMatrix |
getMinorMatrix(int row,
int col)
|
ZMatrix |
getSubMatrix(int fromRow,
int toRow,
int fromCol,
int toCol)
|
static ZMatrix |
getUnitMatrix(int size)
Returns the unit integer matrix of the given size . |
boolean |
isConstant()
Returns true iff the coefficients of this matrix are equal to a constant value. |
boolean |
isOne(int row,
int col)
Returns true iff the coefficient at row ,col is one. |
boolean |
isRegular()
Returns true iff this matrix is regular. |
boolean |
isUnit()
Returns true iff this is a unit matrix. |
boolean |
isZero()
Returns true iff this is a zero matrix. |
boolean |
isZero(int row,
int col)
Returns true iff the coefficient at row ,col is zero. |
int |
minor(int row,
int col)
Returns the minor at row |
ZMatrix |
power(int exponent)
|
int[] |
product(int[] vector)
|
ZMatrix |
product(ZMatrix m)
|
ZMatrix |
quadraticForm()
|
int |
rank()
Returns the rank of this matrix. |
ZMatrix |
scaled(int scalar)
|
void |
set(int row,
int col,
int value)
Sets index row ,col to value . |
void |
setColumnCount(int cols)
Resizes this matrix by changing the number of columns. |
void |
setRowCount(int rows)
Resizes this matrix by changing the number of rows. |
void |
setSubMatrix(int row,
int col,
ZMatrix m)
|
void |
setToElementaryMatrix(int value)
Sets all values of this matrix to value . |
void |
setToOne(int row,
int col)
Sets the coefficient at row ,col to one. |
void |
setToUnitMatrix()
Makes this matrix unit square. |
void |
setToZero(int row,
int col)
Sets the coefficient at row ,col to zero. |
void |
setToZeroMatrix()
Sets all coefficients to zero. |
int |
sum()
Returns the 1-norm of this matrix. |
ZMatrix |
sum(ZMatrix m)
|
java.lang.String |
toString()
Returns a string representation of this matrix. |
ZMatrix |
transposed()
|
Methods inherited from class org.rubato.math.matrix.Matrix |
---|
getColumnCount, getRowCount, isSquare, isZeroColumn, isZeroRow, productPossible, productPossible, sameSize, sameSize |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ZMatrix(int rows, int cols)
rows
x cols
matrix
with all coefficients set to 0.
public ZMatrix(int rows, int cols, int value)
rows
x cols
matrix
with all coefficients set to value
.
public ZMatrix(ZMatrix m)
m
.
public ZMatrix(ZnMatrix m)
m
.
public ZMatrix(int[] v)
v
,
where n is the length of v
.
public ZMatrix(int[][] c)
c
of integers.
Method Detail |
---|
public static ZMatrix getUnitMatrix(int size)
size
.
public int get(int row, int col)
row
,col
.
public void set(int row, int col, int value)
row
,col
to value
.
public void setRowCount(int rows)
Matrix
setRowCount
in class Matrix
public void setColumnCount(int cols)
Matrix
setColumnCount
in class Matrix
public void setToZeroMatrix()
Matrix
setToZeroMatrix
in class Matrix
public void setToZero(int row, int col)
Matrix
row
,col
to zero.
setToZero
in class Matrix
public void setToOne(int row, int col)
Matrix
row
,col
to one.
setToOne
in class Matrix
public void setToUnitMatrix()
Matrix
setToUnitMatrix
in class Matrix
public void setToElementaryMatrix(int value)
value
.
public ZMatrix getSubMatrix(int fromRow, int toRow, int fromCol, int toCol)
public ZMatrix getMinorMatrix(int row, int col)
public ZMatrix transposed()
public ZMatrix adjoint()
public ZMatrix affineDifference()
public ZMatrix quadraticForm()
public ZMatrix scaled(int scalar)
public ZMatrix power(int exponent)
public int rank()
Matrix
rank
in class Matrix
public boolean isConstant()
Matrix
isConstant
in class Matrix
public boolean isZero()
Matrix
isZero
in class Matrix
public boolean isUnit()
Matrix
isUnit
in class Matrix
public boolean isRegular()
Matrix
isRegular
in class Matrix
public boolean isZero(int row, int col)
Matrix
row
,col
is zero.
isZero
in class Matrix
public boolean isOne(int row, int col)
Matrix
row
,col
is one.
isOne
in class Matrix
public int dotProduct(ZMatrix m)
public boolean equals(java.lang.Object object)
equals
in class Matrix
public int compareTo(Matrix object)
Matrix
object
.
If object
is a matrix, but not of the same
type, then the strings representation are compared.
compareTo
in interface java.lang.Comparable<Matrix>
compareTo
in class Matrix
public void setSubMatrix(int row, int col, ZMatrix m)
public ZMatrix sum(ZMatrix m)
public ZMatrix difference(ZMatrix m)
public ZMatrix product(ZMatrix m)
public int[] product(int[] vector)
public int determinant()
public int minor(int row, int col)
row,col
.
public int euclidean()
public int sum()
public java.lang.String toString()
Matrix
toString
in class Matrix
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |