org.bouncycastle.pqc.legacy.math.linearalgebra
Class Vector
java.lang.Object
|
+--org.bouncycastle.pqc.legacy.math.linearalgebra.Vector
- Direct Known Subclasses:
- GF2mVector, GF2Vector
- public abstract class Vector
- extends java.lang.Object
This abstract class defines vectors. It holds the length of vector.
Field Summary |
protected int |
length
the length of this vector |
Method Summary |
abstract Vector |
add(Vector addend)
Add another vector to this vector. |
abstract boolean |
equals(java.lang.Object other)
Check if the given object is equal to this vector. |
abstract byte[] |
getEncoded()
|
int |
getLength()
|
abstract int |
hashCode()
|
abstract boolean |
isZero()
Return whether this is the zero vector (i.e., all elements are zero). |
abstract Vector |
multiply(Permutation p)
Multiply this vector with a permutation. |
abstract java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
length
protected int length
- the length of this vector
Vector
public Vector()
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
public abstract Vector add(Vector addend)
- Add another vector to this vector.
- Parameters:
addend
- the other vector- Returns:
- this + addend
multiply
public abstract Vector multiply(Permutation p)
- Multiply this vector with a permutation.
- Parameters:
p
- the permutation- Returns:
- this*p = p*this
equals
public abstract boolean equals(java.lang.Object other)
- Check if the given object is equal to this vector.
- Overrides:
equals
in class java.lang.Object
- Parameters:
other
- vector- Returns:
- the result of the comparison
hashCode
public abstract int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- Returns:
- the hash code of this vector
toString
public abstract java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- a human readable form of this vector