DenseVector
org.jscience.mathematics.vector

Class DenseVector<F extends Field<F>>

    • 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.
      • 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 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 \xc2\xb7 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.

SCaVis 2.0 © jWork.ORG