|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix | +--org.bouncycastle.pqc.legacy.math.linearalgebra.GF2mMatrix
This class describes some operations with matrices over finite field GF(2 m) with small m (1< m <32).
Matrix
Field Summary | |
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)) |
Fields inherited from class org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix |
MATRIX_TYPE_RANDOM_LT, MATRIX_TYPE_RANDOM_REGULAR, MATRIX_TYPE_RANDOM_UT, MATRIX_TYPE_UNIT, MATRIX_TYPE_ZERO, numColumns, numRows |
Constructor Summary | |
|
GF2mMatrix(GF2mField field,
byte[] enc)
Constructor. |
protected |
GF2mMatrix(GF2mField field,
int[][] matrix)
Constructor. |
|
GF2mMatrix(GF2mMatrix other)
Copy constructor. |
Method Summary | |
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()
|
Methods inherited from class org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix |
getNumColumns, getNumRows |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected GF2mField field
protected int[][] matrix
Constructor Detail |
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.Method Detail |
public byte[] getEncoded()
getEncoded
in class Matrix
public boolean isZero()
isZero
in class Matrix
public Matrix computeInverse()
computeInverse
in class Matrix
public Matrix rightMultiply(Matrix a)
Matrix
rightMultiply
in class Matrix
org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix
a
- the other matrixpublic Matrix rightMultiply(Permutation perm)
Matrix
rightMultiply
in class Matrix
org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix
p
- the permutationpublic Vector leftMultiply(Vector vector)
Matrix
leftMultiply
in class Matrix
org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix
vector
- a vectorpublic Vector rightMultiply(Vector vector)
Matrix
rightMultiply
in class Matrix
org.bouncycastle.pqc.legacy.math.linearalgebra.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
public java.lang.String toString()
toString
in class Matrix
org.bouncycastle.pqc.legacy.math.linearalgebra.Matrix
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |