Class Vector
java.lang.Object
org.bouncycastle.pqc.legacy.math.linearalgebra.Vector
- Direct Known Subclasses:
GF2mVector,GF2Vector
This abstract class defines vectors. It holds the length of vector.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract VectorAdd another vector to this vector.abstract booleanCheck if the given object is equal to this vector.abstract byte[]final intabstract inthashCode()abstract booleanisZero()Return whether this is the zero vector (i.e., all elements are zero).abstract VectorMultiply this vector with a permutation.abstract StringtoString()
-
Field Details
-
length
protected int lengththe length of this vector
-
-
Constructor Details
-
Vector
public Vector()
-
-
Method Details
-
getLength
public final int getLength()- Returns:
- the length of this vector
-
getEncoded
public abstract byte[] getEncoded()- Returns:
- this vector as byte array
-
isZero
public abstract boolean isZero()Return whether this is the zero vector (i.e., all elements are zero).- Returns:
- true if this is the zero vector, false otherwise
-
add
Add another vector to this vector.- Parameters:
addend- the other vector- Returns:
- this + addend
-
multiply
Multiply this vector with a permutation.- Parameters:
p- the permutation- Returns:
- this*p = p*this
-
equals
Check if the given object is equal to this vector. -
hashCode
public abstract int hashCode() -
toString
-