|
JScience v4.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.vector.Vector<F>
org.jscience.mathematics.vector.DenseVector<F>
public final class DenseVector<F extends Field<F>>
This class represents a dense vector.
| Field Summary | |
|---|---|
protected static XMLFormat<DenseVector> |
XML
Holds the default XML representation for dense vectors. |
| Method Summary | ||
|---|---|---|
DenseVector<F> |
copy()
Returns a copy of this vector allocated
by the calling thread (possibly on the stack). |
|
F |
get(int i)
Returns a single element from this vector. |
|
int |
getDimension()
Returns the number of elements held by this vector. |
|
DenseVector<F> |
minus(Vector<F> that)
Returns the difference between this vector and the one specified. |
|
DenseVector<F> |
opposite()
Returns the negation of this vector. |
|
DenseVector<F> |
plus(Vector<F> that)
Returns the sum of this vector with the one specified. |
|
DenseVector<F> |
times(F k)
Returns the product of this vector with the specified coefficient. |
|
F |
times(Vector<F> that)
Returns the dot product of this vector with the one specified. |
|
static
|
valueOf(F... elements)
Returns a dense vector holding the specified elements. |
|
static
|
valueOf(java.util.List<F> elements)
Returns a dense vector holding the elements from the specified collection. |
|
static
|
valueOf(Vector<F> that)
Returns a dense vector equivalent to the specified vector. |
|
| Methods inherited from class org.jscience.mathematics.vector.Vector |
|---|
cross, equals, equals, hashCode, toString, toText |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final XMLFormat<DenseVector> XML
<DenseVector dimension="2">
<Rational value="1/3" />
<Rational value="3/5" />
</DenseVector>
| Method Detail |
|---|
public static <F extends Field<F>> DenseVector<F> valueOf(F... elements)
elements - the vector elements.
public static <F extends Field<F>> DenseVector<F> valueOf(java.util.List<F> elements)
elements - the collection of vector elements.
public static <F extends Field<F>> DenseVector<F> valueOf(Vector<F> that)
that - the vector to convert.
that or a dense vector holding the same elements
as the specified vector.public int getDimension()
Vector
getDimension in class Vector<F extends Field<F>>public F get(int i)
Vector
get in class Vector<F extends Field<F>>i - the element index (range [0..n[).
i.public DenseVector<F> opposite()
Vector
opposite in interface GroupAdditive<Vector<F extends Field<F>>>opposite in class Vector<F extends Field<F>>-this.public DenseVector<F> plus(Vector<F> that)
Vector
plus in interface GroupAdditive<Vector<F extends Field<F>>>plus in class Vector<F extends Field<F>>that - the vector to be added.
this + that.public DenseVector<F> minus(Vector<F> that)
Vector
minus in class Vector<F extends Field<F>>that - the vector to be subtracted.
this - that.public DenseVector<F> times(F k)
Vector
times in interface VectorSpace<Vector<F extends Field<F>>,F extends Field<F>>times in class Vector<F extends Field<F>>k - the coefficient multiplier.
this · kpublic F times(Vector<F> that)
Vector
times in class Vector<F extends Field<F>>that - the vector multiplier.
this · thatpublic DenseVector<F> copy()
Vectorallocated
by the calling thread (possibly on the stack).
copy in interface ValueTypecopy in class Vector<F extends Field<F>>
|
JScience v4.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||