Matrix
| 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)) |
| Access | Constructor and Description |
|---|---|
| public | GF2mMatrix(GF2mField
a finite field GF(2^m) field, byte[] byte[] matrix in byte array form enc)Constructor. |
| public | |
| protected | GF2mMatrix(GF2mField
a finite field GF(2^m) field, int[][] the matrix as int array. Only the reference is copied. matrix)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public Matrix | Returns: the inverse of this matrix (newly created).Implements abstract org. Compute the inverse of this matrix. |
| public boolean | Returns: true or falseobject other)Overrides java. Checks if given object is equal to this matrix. |
| public byte[] | Returns: a byte array encoding of this matrixImplements abstract org.
|
| public int | |
| public boolean | Returns: true if this is the zero matrixImplements abstract org. Check if this is the zero matrix (i.e., all entries are zero). |
| public Vector | leftMultiply(Vector
a vector vector)Implements abstract org. Compute the product of a vector and this matrix. |
| private int[] | |
| private void | |
| public Matrix | rightMultiply(Matrix
the other matrix a)Implements abstract org. Compute the product of this matrix and another matrix. |
| public Matrix | rightMultiply(Permutation
the permutation perm)Implements abstract org. Compute the product of this matrix and a permutation. |
| public Vector | rightMultiply(Vector
a vector vector)Implements abstract org. Compute the product of this matrix and a vector. |
| private static void | |
| public String | toString()
Implements abstract org. Returns a string representation of the object. |
| field | back to summary |
|---|---|
| protected GF2mField field finite field GF(2^m) | |
| matrix | back to summary |
|---|---|
| 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)) | |
| GF2mMatrix | back to summary |
|---|---|
| public GF2mMatrix(GF2mField field, byte[] enc) Constructor.
| |
| GF2mMatrix | back to summary |
|---|---|
| public GF2mMatrix(GF2mMatrix other) Copy constructor.
| |
| GF2mMatrix | back to summary |
|---|---|
| protected GF2mMatrix(GF2mField field, int[][] matrix) Constructor.
| |
| addToRow | back to summary |
|---|---|
| private void addToRow(int[] fromRow, int[] toRow) Add one row to another.
| |
| computeInverse | back to summary |
|---|---|
| public Matrix computeInverse() Implements abstract org. Compute the inverse of this matrix.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Checks if given object is equal to this matrix. The method returns false whenever the given object is not a matrix over GF(2^m).
| |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded() Implements abstract org.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isZero | back to summary |
|---|---|
| public boolean isZero() Implements abstract org. Check if this is the zero matrix (i.e., all entries are zero).
| |
| leftMultiply | back to summary |
|---|---|
| public Vector leftMultiply(Vector vector) Implements abstract org. Doc from org. Compute the product of a vector and this matrix. If the length of the vector is greater than the number of rows of this matrix, the matrix is multiplied by each m-bit part of the vector. | |
| multRowWithElement | back to summary |
|---|---|
| private int[] multRowWithElement(int[] row, int element) | |
| multRowWithElementThis | back to summary |
|---|---|
| private void multRowWithElementThis(int[] row, int element) | |
| rightMultiply | back to summary |
|---|---|
| public Matrix rightMultiply(Matrix a) Implements abstract org. Doc from org. Compute the product of this matrix and another matrix. | |
| rightMultiply | back to summary |
|---|---|
| public Matrix rightMultiply(Permutation perm) Implements abstract org. Doc from org. Compute the product of this matrix and a permutation.
| |
| rightMultiply | back to summary |
|---|---|
| public Vector rightMultiply(Vector vector) Implements abstract org. Doc from org. Compute the product of this matrix and a vector. | |
| swapColumns | back to summary |
|---|---|
| private static void swapColumns(int[][] matrix, int first, int second) | |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |