|
JScience v3.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavolution.context.RealtimeObject
org.jscience.mathematics.vectors.Vector<F>
public abstract class Vector<F extends Field<F>>
This class represents an immutable element of a vector space.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javolution.context.RealtimeObject |
|---|
RealtimeObject.Factory<T extends RealtimeObject> |
| Nested classes/interfaces inherited from interface javolution.context.Realtime |
|---|
Realtime.ObjectSpace |
| Constructor Summary | |
|---|---|
protected |
Vector()
Default constructor (for sub-classes). |
| Method Summary | ||
|---|---|---|
Vector<F> |
cross(Vector<F> that)
Returns the cross product of two 3-dimensional vectors. |
|
boolean |
equals(java.lang.Object that)
Indicates if this vector is equal to the object specified. |
|
boolean |
equals(Vector<F> that,
java.util.Comparator<F> cmp)
Indicates if this vector can be considered equals to the one specified using the specified comparator when testing for element equality. |
|
abstract F |
get(int i)
Returns a single element from this vector. |
|
abstract int |
getDimension()
Returns the number of elements held by this vector. |
|
int |
hashCode()
Returns a hash code value for this vector. |
|
Vector<F> |
minus(Vector<F> that)
Returns the difference between this vector and the one specified. |
|
abstract Vector<F> |
opposite()
Returns the negation of this vector. |
|
abstract Vector<F> |
plus(Vector<F> that)
Returns the sum of this vector with the one specified. |
|
abstract Vector<F> |
times(F k)
Returns the product of this vector with the specified coefficient. |
|
abstract F |
times(Vector<F> that)
Returns the dot product of this vector with the one specified. |
|
Text |
toText()
Returns the text representation of this vector. |
|
static Float64Vector |
valueOf(double... values)
Deprecated. Since 3.3 - Replaced by Float64Vector.valueOf(double[]) |
|
static
|
valueOf(F... elements)
Deprecated. Since 3.3 - Replaced by DenseVector.valueOf(Field[]) |
|
| Methods inherited from class javolution.context.RealtimeObject |
|---|
export, isLocal, move, moveHeap, preserve, toString, unpreserve |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javolution.context.Realtime |
|---|
move |
| Constructor Detail |
|---|
protected Vector()
| Method Detail |
|---|
public static <F extends Field<F>> Vector<F> valueOf(F... elements)
DenseVector.valueOf(Field[])
DenseVector.valueOf(elements)
)
elements - the vector elements.
public static Float64Vector valueOf(double... values)
Float64Vector.valueOf(double[])
double
values (convenience method equivalent to
Float64Vector.valueOf(values)).
values - the values of the vector elements.
public abstract int getDimension()
public abstract F get(int i)
i - the element index (range [0..n[).
i.
java.lang.IndexOutOfBoundsException - (i < 0) || (i >= size())public abstract Vector<F> opposite()
opposite in interface GroupAdditive<Vector<F extends Field<F>>>-this.public abstract Vector<F> plus(Vector<F> that)
plus in interface GroupAdditive<Vector<F extends Field<F>>>that - the vector to be added.
this + that.
DimensionException - is vectors dimensions are different.public Vector<F> minus(Vector<F> that)
that - the vector to be subtracted.
this - that.public abstract Vector<F> times(F k)
times in interface VectorSpace<Vector<F extends Field<F>>,F extends Field<F>>k - the coefficient multiplier.
this · kpublic abstract F times(Vector<F> that)
that - the vector multiplier.
this · that
DimensionException - if this.dimension() != that.dimension()public Vector<F> cross(Vector<F> that)
that - the vector multiplier.
this x that
DimensionException - if
(this.getDimension() != 3) && (that.getDimension() != 3)public Text toText()
toText in interface RealtimetoText in class RealtimeObject
public boolean equals(Vector<F> that,
java.util.Comparator<F> cmp)
that - the vector to compare for equality.cmp - the comparator to use when testing for element equality.
true if this vector and the specified matrix are
both vector with equal elements according to the specified
comparator; false otherwise.public boolean equals(java.lang.Object that)
equals in class java.lang.Objectthat - the object to compare for equality.
true if this vector and the specified object are
both vectors with equal elements; false otherwise.public int hashCode()
hashCode in class java.lang.Objectequals(org.jscience.mathematics.vectors.Vector, java.util.Comparator)
|
JScience v3.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||