|
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.Permutation
This class implements permutations of the set {0,1,[],n-1} for some given n > 0, i.e., ordered sequences containing each number m ( 0 <= m < n) once and only once.
Constructor Summary | |
Permutation(byte[] enc)
Create a permutation from an encoded permutation. |
|
Permutation(int n)
Create the identity permutation of the given size. |
|
Permutation(int[] perm)
Create a permutation using the given permutation vector. |
|
Permutation(int n,
java.security.SecureRandom sr)
Create a random permutation of the given size. |
Method Summary | |
Permutation |
computeInverse()
Compute the inverse permutation P -1. |
boolean |
equals(java.lang.Object other)
checks if given object is equal to this permutation. |
byte[] |
getEncoded()
Encode this permutation as byte array. |
int[] |
getVector()
|
int |
hashCode()
|
Permutation |
rightMultiply(Permutation p)
Compute the product of this permutation and another permutation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Permutation(int n)
n
- the size of the permutationpublic Permutation(int[] perm)
perm
- the permutation vectorpublic Permutation(byte[] enc)
enc
- the encoded permutationpublic Permutation(int n, java.security.SecureRandom sr)
n
- the size of the permutationsr
- the source of randomnessMethod Detail |
public byte[] getEncoded()
public int[] getVector()
public Permutation computeInverse()
public Permutation rightMultiply(Permutation p)
p
- the other permutationpublic boolean equals(java.lang.Object other)
The method returns false whenever the given object is not permutation.
equals
in class java.lang.Object
other
- -
permutationpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |