Class DenseVector<F extends Field<F>>

    • Field Detail

      • XML

        protected static final javolution.xml.XMLFormat<DenseVector> XML
        Holds the default XML representation for dense vectors. For example: [code] [/code]
    • Method Detail

      • valueOf

        public static <F extends Field<F>> DenseVector<F> valueOf​(F... elements)
        Returns a dense vector holding the specified elements.
        Parameters:
        elements - the vector elements.
        Returns:
        the vector having the specified elements.
      • valueOf

        public static <F extends Field<F>> DenseVector<F> valueOf​(List<F> elements)
        Returns a dense vector holding the elements from the specified collection.
        Parameters:
        elements - the collection of vector elements.
        Returns:
        the vector having the specified elements.
      • valueOf

        public static <F extends Field<F>> DenseVector<F> valueOf​(Vector<F> that)
        Returns a dense vector equivalent to the specified vector.
        Parameters:
        that - the vector to convert.
        Returns:
        that or a dense vector holding the same elements as the specified vector.
      • getDimension

        public int getDimension()
        Description copied from class: Vector
        Returns the number of elements held by this vector.
        Specified by:
        getDimension in class Vector<F extends Field<F>>
        Returns:
        this vector dimension.
      • get

        public F get​(int i)
        Description copied from class: Vector
        Returns a single element from this vector.
        Specified by:
        get in class Vector<F extends Field<F>>
        Parameters:
        i - the element index (range [0..n[).
        Returns:
        the element at i.
      • plus

        public DenseVector<F> plus​(Vector<F> that)
        Description copied from class: Vector
        Returns the sum of this vector with the one specified.
        Specified by:
        plus in interface GroupAdditive<F extends Field<F>>
        Specified by:
        plus in class Vector<F extends Field<F>>
        Parameters:
        that - the vector to be added.
        Returns:
        this + that.
      • minus

        public DenseVector<F> minus​(Vector<F> that)
        Description copied from class: Vector
        Returns the difference between this vector and the one specified.
        Overrides:
        minus in class Vector<F extends Field<F>>
        Parameters:
        that - the vector to be subtracted.
        Returns:
        this - that.
      • times

        public DenseVector<F> times​(F k)
        Description copied from class: Vector
        Returns the product of this vector with the specified coefficient.
        Specified by:
        times in interface VectorSpace<Vector<F extends Field<F>>,​F extends Field<F>>
        Specified by:
        times in class Vector<F extends Field<F>>
        Parameters:
        k - the coefficient multiplier.
        Returns:
        this · k
      • times

        public F times​(Vector<F> that)
        Description copied from class: Vector
        Returns the dot product of this vector with the one specified.
        Specified by:
        times in class Vector<F extends Field<F>>
        Parameters:
        that - the vector multiplier.
        Returns:
        this · that
        See Also:
        Wikipedia: Dot Product
      • copy

        public DenseVector<F> copy()
        Description copied from class: Vector
        Returns a copy of this vector allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface javolution.lang.ValueType
        Specified by:
        copy in class Vector<F extends Field<F>>
        Returns:
        an identical and independant copy of this matrix.