| Modifier and Type | Field and Description |
|---|---|
protected GF2mField |
field
finite field GF(2^m)
|
protected int[][] |
matrix
For the matrix representation the array of type int[][] is used, thus
every element of the array keeps one element of the matrix (element from
finite field GF(2^m))
|
MATRIX_TYPE_RANDOM_LT, MATRIX_TYPE_RANDOM_REGULAR, MATRIX_TYPE_RANDOM_UT, MATRIX_TYPE_UNIT, MATRIX_TYPE_ZERO, numColumns, numRows| Modifier | Constructor and Description |
|---|---|
|
GF2mMatrix(GF2mField field,
byte[] enc)
Constructor.
|
protected |
GF2mMatrix(GF2mField field,
int[][] matrix)
Constructor.
|
|
GF2mMatrix(GF2mMatrix other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Matrix |
computeInverse()
Compute the inverse of this matrix.
|
boolean |
equals(java.lang.Object other)
Checks if given object is equal to this matrix.
|
byte[] |
getEncoded() |
int |
hashCode() |
boolean |
isZero()
Check if this is the zero matrix (i.e., all entries are zero).
|
Vector |
leftMultiply(Vector vector)
Compute the product of a vector and this matrix.
|
Matrix |
rightMultiply(Matrix a)
Compute the product of this matrix and another matrix.
|
Matrix |
rightMultiply(Permutation perm)
Compute the product of this matrix and a permutation.
|
Vector |
rightMultiply(Vector vector)
Compute the product of this matrix and a vector.
|
java.lang.String |
toString() |
getNumColumns, getNumRowsprotected GF2mField field
protected int[][] matrix
public GF2mMatrix(GF2mField field, byte[] enc)
field - a finite field GF(2^m)enc - byte[] matrix in byte array formpublic GF2mMatrix(GF2mMatrix other)
other - another GF2mMatrixprotected GF2mMatrix(GF2mField field, int[][] matrix)
field - a finite field GF(2^m)matrix - the matrix as int array. Only the reference is copied.public byte[] getEncoded()
getEncoded in class Matrixpublic boolean isZero()
public Matrix computeInverse()
computeInverse in class Matrixpublic Matrix rightMultiply(Matrix a)
MatrixrightMultiply in class Matrixa - the other matrixpublic Matrix rightMultiply(Permutation perm)
MatrixrightMultiply in class Matrixperm - the permutationpublic Vector leftMultiply(Vector vector)
MatrixleftMultiply in class Matrixvector - a vectorpublic Vector rightMultiply(Vector vector)
MatrixrightMultiply in class Matrixvector - a vectorpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - objectpublic int hashCode()
hashCode in class java.lang.Object