Class Vector

  • Direct Known Subclasses:
    GF2mVector, GF2Vector

    public abstract class Vector
    extends Object
    This abstract class defines vectors. It holds the length of vector.
    • Field Detail

      • length

        protected int length
        the length of this vector
    • Constructor Detail

      • Vector

        public Vector()
    • Method Detail

      • 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​(Object other)
        Check if the given object is equal to this vector.
        Overrides:
        equals in class Object
        Parameters:
        other - vector
        Returns:
        the result of the comparison
      • hashCode

        public abstract int hashCode()
        Overrides:
        hashCode in class Object
        Returns:
        the hash code of this vector
      • toString

        public abstract String toString()
        Overrides:
        toString in class Object
        Returns:
        a human readable form of this vector