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, getNumRows
protected 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 GF2mMatrix
protected 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 Matrix
public boolean isZero()
public Matrix computeInverse()
computeInverse
in class Matrix
public Matrix rightMultiply(Matrix a)
Matrix
rightMultiply
in class Matrix
a
- the other matrixpublic Matrix rightMultiply(Permutation perm)
Matrix
rightMultiply
in class Matrix
perm
- the permutationpublic Vector leftMultiply(Vector vector)
Matrix
leftMultiply
in class Matrix
vector
- a vectorpublic Vector rightMultiply(Vector vector)
Matrix
rightMultiply
in class Matrix
vector
- a vectorpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- objectpublic int hashCode()
hashCode
in class java.lang.Object