|
JADE v6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dautelle.realtime.RealtimeObject
com.dautelle.math.Matrix
com.dautelle.math.Vector
This class represents an element of a vector space arranged as
single column Matrix.
| Nested Class Summary |
| Nested classes inherited from class com.dautelle.realtime.RealtimeObject |
RealtimeObject.Factory |
| Constructor Summary | |
protected |
Vector()
Default constructor. |
| Method Summary | |
Vector |
cross(Vector that)
Returns the cross product of two 3-dimensional vectors. |
Operable |
dot(Vector that)
Returns the dot product of this vector with the one specified. |
Operable |
get(int i)
Returns a single coordinate from this vector. |
int |
getDimension()
Returns the dimension of this vector. |
static Vector |
newInstance(int n)
Returns a n-dimensional vector filled with null coordinates
elements. |
void |
set(int i,
Operable coordinate)
Sets a single coordinate of this vector. |
java.lang.String |
toString()
Returns the text representation of this vector. |
void |
toXml(XmlElement xml)
Sets the attributes and content of the XML element corresponding to this object. |
static Vector |
valueOf(java.util.Collection coordinates)
Returns a n-dimensional vector populated from the specified collection of Operable objects. |
static Vector |
valueOf(Operable[] coordinates)
Returns the vector corresponding to the specified Operable
coordinates. |
static Matrix |
valueOf(XmlElement xml)
XML factory method. |
| Methods inherited from class com.dautelle.math.Matrix |
add, adjoint, cofactor, determinant, divide, equals, export, get, getColumnDimension, getMatrix, getMatrix, getRowDimension, hashCode, inverse, isSquare, lu, multiply, multiply, negate, newInstance, opposite, plus, pow, pseudoInverse, reciprocal, set, subtract, tensor, times, toHeap, trace, transpose, valueOf, valueOf, valueOf |
| Methods inherited from class com.dautelle.realtime.RealtimeObject |
clone, isLocalObject, isPoolObject, recycle |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected Vector()
| Method Detail |
public static Vector newInstance(int n)
null coordinates
elements.
n - the dimension of this vector.
public static Vector valueOf(Operable[] coordinates)
Operable
coordinates.
Note: It is safe to reuse the specifed array as it is not internally referenced by the vector being returned.
coordinates - the array of Operable objects.
public static Vector valueOf(java.util.Collection coordinates)
Operable objects.
coordinates - the collection of Operable objects.
java.lang.ClassCastException - if any of the element is not Operable.public static Matrix valueOf(XmlElement xml)
xml - the XML element describing the vector to return.
For example:
<math:Vector >
<math:Complex real="1.0" imaginary="0.0"/>
<math:Complex real="0.0" imaginary="1.0"/>
</math:Vector>
public final int getDimension()
public final Operable get(int i)
i - the coordinate index (range [0..n[).
i.
java.lang.IndexOutOfBoundsException - i >= getDimension()
public final void set(int i,
Operable coordinate)
i - the coordinate index (range [0..n[).coordinate - the coordinate set at i.
java.lang.IndexOutOfBoundsException - i >= getDimension()public final Operable dot(Vector that)
that - the vector multiplier.
this ยท that
DimensionException - if
this.getDimension() != that.getDimension()public final Vector cross(Vector that)
that - the vector multiplier.
this x that
DimensionException - if
(this.getDimension() != 3) &&
(that.getDimension() != 3)public java.lang.String toString()
toString in class Matrixpublic void toXml(XmlElement xml)
Representable
toXml in interface RepresentabletoXml in class Matrix
|
JADE v6.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||