|
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<Complex>
org.jscience.mathematics.vector.ComplexVector
public final class ComplexVector
This class represents an optimized vector implementation
for complex numbers elements.
| Field Summary | |
|---|---|
protected static XMLFormat<ComplexVector> |
XML
Holds the default XML representation. |
| Method Summary | |
|---|---|
ComplexVector |
copy()
Returns a copy of this vector allocated
by the calling thread (possibly on the stack). |
Complex |
get(int i)
Returns a single element from this vector. |
int |
getDimension()
Returns the number of elements held by this vector. |
double |
getImaginary(int i)
Returns the imaginary value of a complex number from this vector (fast). |
double |
getReal(int i)
Returns the real value of a complex number from this vector (fast). |
ComplexVector |
minus(Vector<Complex> that)
Returns the difference between this vector and the one specified. |
Complex |
norm()
Returns the Euclidian norm of this vector (square root of the dot product of this vector and itself). |
ComplexVector |
opposite()
Returns the negation of this vector. |
ComplexVector |
plus(Vector<Complex> that)
Returns the sum of this vector with the one specified. |
ComplexVector |
times(Complex k)
Returns the product of this vector with the specified coefficient. |
Complex |
times(Vector<Complex> that)
Returns the dot product of this vector with the one specified. |
static ComplexVector |
valueOf(Complex... elements)
Returns a new vector holding the specified complex numbers. |
static ComplexVector |
valueOf(java.util.List<Complex> elements)
Returns a new vector holding the elements from the specified collection. |
static ComplexVector |
valueOf(Vector<Complex> that)
Returns a ComplexVector instance 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<ComplexVector> XML
<ComplexVector dimension="2">
<Complex real="1.0" imaginary="-3.0" />
<Complex real="0.0" imaginary="2.0" />
</ComplexVector>
| Method Detail |
|---|
public static ComplexVector valueOf(Complex... elements)
elements - the complex numbers elements.
public static ComplexVector valueOf(java.util.List<Complex> elements)
elements - the collection of floating-points numbers.
public static ComplexVector valueOf(Vector<Complex> that)
ComplexVector instance equivalent to the
specified vector.
that - the vector to convert.
that or new equivalent ComplexVector.public double getReal(int i)
i - the complex number index.
i.
java.lang.IndexOutOfBoundsException - (i < 0) || (i >= dimension())public double getImaginary(int i)
i - the complex number index.
i.
java.lang.IndexOutOfBoundsException - (i < 0) || (i >= dimension())public Complex norm()
norm in interface VectorSpaceNormed<Vector<Complex>,Complex>sqrt(this · this).public int getDimension()
Vector
getDimension in class Vector<Complex>public Complex get(int i)
Vector
get in class Vector<Complex>i - the element index (range [0..n[).
i.public ComplexVector opposite()
Vector
opposite in interface GroupAdditive<Vector<Complex>>opposite in class Vector<Complex>-this.public ComplexVector plus(Vector<Complex> that)
Vector
plus in interface GroupAdditive<Vector<Complex>>plus in class Vector<Complex>that - the vector to be added.
this + that.public ComplexVector minus(Vector<Complex> that)
Vector
minus in class Vector<Complex>that - the vector to be subtracted.
this - that.public ComplexVector times(Complex k)
Vector
times in interface VectorSpace<Vector<Complex>,Complex>times in class Vector<Complex>k - the coefficient multiplier.
this · kpublic Complex times(Vector<Complex> that)
Vector
times in class Vector<Complex>that - the vector multiplier.
this · thatpublic ComplexVector copy()
Vectorallocated
by the calling thread (possibly on the stack).
copy in interface ValueTypecopy in class Vector<Complex>
|
JScience v4.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||