|
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>
public abstract class Vector<F extends Field<F>>
This class represents an immutable element of a vector space.
| Constructor Summary | |
|---|---|
protected |
Vector()
Default constructor (for sub-classes). |
| Method Summary | |
|---|---|
abstract Vector<F> |
copy()
Returns a copy of this vector allocated
by the calling thread (possibly on the stack). |
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. |
java.lang.String |
toString()
Returns the text representation of this vector as a java.lang.String. |
javolution.text.Text |
toText()
Returns the text representation of this vector. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Vector()
| Method Detail |
|---|
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 javolution.text.Text toText()
toText in interface javolution.lang.Realtimepublic final java.lang.String toString()
java.lang.String.
toString in class java.lang.ObjecttoText().toString()
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.vector.Vector, java.util.Comparator) public abstract Vector<F> copy()
allocated
by the calling thread (possibly on the stack).
copy in interface javolution.lang.ValueType
|
JScience v4.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||