public final class ComplexVector extends Vector<Complex> implements VectorSpaceNormed<Vector<Complex>,Complex>
| Modifier and Type | Method and Description |
|---|---|
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(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. |
public static ComplexVector valueOf(Complex... elements)
elements - the complex numbers elements.public static ComplexVector valueOf(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.IndexOutOfBoundsException - (i < 0) || (i >= dimension())public double getImaginary(int i)
i - the complex number index.i.IndexOutOfBoundsException - (i < 0) || (i >= dimension())public Complex norm()
norm in interface VectorSpaceNormed<Vector<Complex>,Complex>sqrt(this · this).public int getDimension()
VectorgetDimension in class Vector<Complex>public Complex get(int i)
Vectorpublic ComplexVector opposite()
Vectorpublic ComplexVector plus(Vector<Complex> that)
Vectorpublic ComplexVector minus(Vector<Complex> that)
Vectorpublic ComplexVector times(Complex k)
Vectorpublic Complex times(Vector<Complex> that)
Vectortimes in class Vector<Complex>that - the vector multiplier.this · thatpublic ComplexVector copy()
Vectorallocated
by the calling thread (possibly on the stack).