Top Description Fields Constructors Methods
org.bouncycastle.pqc.legacy.math.linearalgebra

public abstract Class Vector

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.pqc.legacy.math.linearalgebra.GF2mVector, org.bouncycastle.pqc.legacy.math.linearalgebra.GF2Vector

This abstract class defines vectors. It holds the length of vector.

Field Summary

Modifier and TypeField and Description
protected int
length

the length of this vector

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Vector

Returns:

this + addend
add
(Vector
the other vector
addend
)

Add another vector to this vector.

public abstract boolean

Returns:

the result of the comparison
equals
(Object
vector
other
)

Overrides java.lang.Object.equals.

Check if the given object is equal to this vector.

public abstract byte[]

Returns:

this vector as byte array
getEncoded
()

public final int

Returns:

the length of this vector
getLength
()

public abstract int

Returns:

the hash code of this vector
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public abstract boolean

Returns:

true if this is the zero vector, false otherwise
isZero
()

Return whether this is the zero vector (i.e., all elements are zero).

public abstract Vector

Returns:

this*p = p*this
multiply
(Permutation
the permutation
p
)

Multiply this vector with a permutation.

public abstract String

Returns:

a human readable form of this vector
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

lengthback to summary
protected int length

the length of this vector

Constructor Detail

Vectorback to summary
public Vector()

Method Detail

addback to summary
public abstract Vector add(Vector addend)

Add another vector to this vector.

Parameters
addend:Vector

the other vector

Returns:Vector

this + addend

equalsback to summary
public abstract boolean equals(Object other)

Overrides java.lang.Object.equals.

Check if the given object is equal to this vector.

Parameters
other:Object

vector

Returns:boolean

the result of the comparison

getEncodedback to summary
public abstract byte[] getEncoded()
Returns:byte[]

this vector as byte array

getLengthback to summary
public final int getLength()
Returns:int

the length of this vector

hashCodeback to summary
public abstract int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

the hash code of this vector

isZeroback to summary
public abstract boolean isZero()

Return whether this is the zero vector (i.e., all elements are zero).

Returns:boolean

true if this is the zero vector, false otherwise

multiplyback to summary
public abstract Vector multiply(Permutation p)

Multiply this vector with a permutation.

Parameters
p:Permutation

the permutation

Returns:Vector

this*p = p*this

toStringback to summary
public abstract String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a human readable form of this vector