\n\n\n\nDenseVector\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n
\n
\n
\n\n\n\n
\n
org.jscience.mathematics.vector
\n

## Class DenseVector<F extends Field<F>>

\n
\n
\n
\n
\n
\n
• \n
\n
All Implemented Interfaces:
\n
javolution.lang.Immutable, javolution.lang.Realtime, javolution.lang.ValueType, GroupAdditive<Vector<F>>, Structure<Vector<F>>, VectorSpace<Vector<F>,F>
\n
\n
\n
\n
`public final class DenseVector<F extends Field<F>>\nextends Vector<F>`
\n

This class represents a dense vector.

\n
• \n
\n
\n
\n
\n
• \n\n
\n
• \n\n\n

### Method Summary

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Methods
Modifier and TypeMethod and Description
`DenseVector<F>``copy()`\n
Returns a copy of this vector \n `allocated` \n by the calling thread (possibly on the stack).
\n
`F``get(int i)`\n
Returns a single element from this vector.
\n
`int``getDimension()`\n
Returns the number of elements held by this vector.
\n
`DenseVector<F>``minus(Vector<F> that)`\n
Returns the difference between this vector and the one specified.
\n
`DenseVector<F>``opposite()`\n
Returns the negation of this vector.
\n
`DenseVector<F>``plus(Vector<F> that)`\n
Returns the sum of this vector with the one specified.
\n
`DenseVector<F>``times(F k)`\n
Returns the product of this vector with the specified coefficient.
\n
`F``times(Vector<F> that)`\n
Returns the dot product of this vector with the one specified.
\n
`static <F extends Field<F>> DenseVector<F>``valueOf(F... elements)`\n
Returns a dense vector holding the specified elements.
\n
`static <F extends Field<F>> DenseVector<F>``valueOf(List<F> elements)`\n
Returns a dense vector holding the elements from the specified \n collection.
\n
`static <F extends Field<F>> DenseVector<F>``valueOf(Vector<F> that)`\n
Returns a dense vector equivalent to the specified vector.
\n
\n
\n
• \n\n\n

### Methods inherited from class org.jscience.mathematics.vector.Vector

\n`cross, equals, equals, hashCode, toString, toText`
• \n
\n
\n
• \n\n\n

### Methods inherited from class java.lang.Object

\n`getClass, notify, notifyAll, wait, wait, wait`
• \n
\n
• \n
\n
• \n
\n
\n
\n
\n
• \n\n
\n
• \n\n\n

### Method Detail

\n\n\n\n\n\n
\n
• \n

#### valueOf

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

#### valueOf

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

#### valueOf

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

#### getDimension

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

#### get

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

#### opposite

\n
`public DenseVector<F> opposite()`
\n
Description copied from class: `Vector`
\n
Returns the negation of this vector.
\n
\n
Specified by:
\n
`opposite` in interface `GroupAdditive<Vector<F extends Field<F>>>`
\n
Specified by:
\n
`opposite` in class `Vector<F extends Field<F>>`
\n
Returns:
`-this`.
\n
• \n
\n\n\n\n
\n
• \n

#### plus

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

#### minus

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

#### times

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

#### times

\n
`public F times(Vector<F> that)`
\n
Description copied from class: `Vector`
\n
Returns the dot product of this vector with the one specified.
\n
\n
Specified by:
\n
`times` in class `Vector<F extends Field<F>>`
\n
Parameters:
`that` - the vector multiplier.
\n
Returns:
`this \xc2\xb7 that`
\n Wikipedia: Dot Product
\n
• \n
\n\n\n\n
\n
• \n

#### copy

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