Class GenVector<C extends RingElem<C>>

    • Field Detail

      • logger

        private static final org.apache.logging.log4j.Logger logger
      • val

        public final java.util.List<C extends RingElem<C>> val
    • Constructor Detail

      • GenVector

        public GenVector​(GenVectorModul<C> m)
        Constructor for zero GenVector.
      • GenVector

        public GenVector​(GenVectorModul<C> m,
                         java.util.List<C> v)
        Constructor for GenVector.
      • GenVector

        public GenVector​(GenVectorModul<C> m,
                         C[] v)
        Constructor for GenVector.
    • Method Detail

      • toString

        public java.lang.String toString()
        Get the String representation as RingElem.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • toScript

        public java.lang.String toScript()
        Get a scripting compatible string representation.
        Specified by:
        toScript in interface Element<C extends RingElem<C>>
        Returns:
        script compatible representation for this Element.
        See Also:
        Element.toScript()
      • toScriptFactory

        public java.lang.String toScriptFactory()
        Get a scripting compatible string representation of the factory.
        Specified by:
        toScriptFactory in interface Element<C extends RingElem<C>>
        Returns:
        script compatible representation for this ElemFactory.
        See Also:
        Element.toScriptFactory()
      • copy

        public GenVector<C> copy()
        clone method.
        Specified by:
        copy in interface Element<C extends RingElem<C>>
        Returns:
        Creates and returns a copy of this Element.
        See Also:
        Object.clone()
      • isZERO

        public boolean isZERO()
        test if this is equal to a zero vector.
        Specified by:
        isZERO in interface AbelianGroupElem<C extends RingElem<C>>
        Returns:
        true if this is 0, else false.
      • equals

        public boolean equals​(java.lang.Object other)
        equals method.
        Specified by:
        equals in interface Element<C extends RingElem<C>>
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to b, else false.
      • hashCode

        public int hashCode()
        Hash code for this GenVector.
        Specified by:
        hashCode in interface Element<C extends RingElem<C>>
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashCode.
        See Also:
        Object.hashCode()
      • compareTo

        public int compareTo​(GenVector<C> b)
        compareTo, lexicographical comparison.
        Specified by:
        compareTo in interface java.lang.Comparable<C extends RingElem<C>>
        Specified by:
        compareTo in interface Element<C extends RingElem<C>>
        Parameters:
        b - other
        Returns:
        1 if (this < b), 0 if (this == b) or -1 if (this > b).
      • get

        public C get​(int i)
        get element.
        Parameters:
        i - index
        Returns:
        e with e = this(i).
      • setMutate

        public C setMutate​(int i,
                           C e)
        set element, mutate this.
        Parameters:
        i - index
        e - value
        Returns:
        this with this(i) = e.
      • signum

        public int signum()
        sign of vector.
        Specified by:
        signum in interface AbelianGroupElem<C extends RingElem<C>>
        Returns:
        1 if (this < 0), 0 if (this == 0) or -1 if (this > 0).
      • multiply

        public GenVector<C> multiply​(C s)
        Product of this vector with scalar.
        Parameters:
        s - scalar.
        Returns:
        this*s
      • leftScalarMultiply

        public GenVector<C> leftScalarMultiply​(C s)
        Left product of this vector with scalar.
        Parameters:
        s - scalar.
        Returns:
        s*this
      • linearCombination

        public GenVector<C> linearCombination​(C t,
                                              GenVector<C> b)
        Left linear combination of this vector with scalar multiple of other vector.
        Parameters:
        b - other vector.
        t - scalar.
        Returns:
        this+t*b
      • leftLinearCombination

        public GenVector<C> leftLinearCombination​(C s,
                                                  C t,
                                                  GenVector<C> b)
        left linear combination of this vector with scalar multiple of other vector.
        Parameters:
        s - scalar.
        b - other vector.
        t - scalar.
        Returns:
        s*this+t*b
      • rightScalarProduct

        public GenVector<C> rightScalarProduct​(java.util.List<GenVector<C>> B)
        right scalar / dot product of this vector with list of other vectors.
        Parameters:
        B - list of vectors.
        Returns:
        b * this