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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Vector
Add another vector to this vector.abstract boolean
Check if the given object is equal to this vector.abstract byte[]
final int
abstract int
hashCode()
abstract boolean
isZero()
Return whether this is the zero vector (i.e., all elements are zero).abstract Vector
Multiply this vector with a permutation.abstract String
toString()
-
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
-