public class Complex3Vector extends ComplexVector
ARRAY_1D, vectorIm, vectorReCLASS_SPECIFIC, N, storageFormat| Constructor and Description |
|---|
Complex3Vector()
Constructs an empty 3-vector.
|
Complex3Vector(Complex x,
Complex y,
Complex z)
Constructs a 3-vector.
|
Complex3Vector(double[] real,
double[] imag)
Constructs a 3-vector by wrapping two arrays.
|
| Modifier and Type | Method and Description |
|---|---|
Complex3Vector |
add(Complex3Vector v)
Returns the addition of this vector and another.
|
Complex3Vector |
add(Double3Vector v)
Returns the addition of this vector and another.
|
Complex3Vector |
add(Integer3Vector v)
Returns the addition of this vector and another.
|
ComplexVector |
conjugate()
Returns the complex conjugate of this vector.
|
boolean |
equals(java.lang.Object a)
Compares two complex vectors for equality.
|
Complex |
getComponent(int n)
Returns a component of this vector.
|
int |
hashCode()
Returns a hashcode for this vector.
|
DoubleVector |
imag()
Returns the imaginary part of this complex 3-vector.
|
double |
infNorm()
Returns the l
-norm. |
ComplexVector |
mapComponents(ComplexMapping f)
Applies a function on all the vector components.
|
Complex3Vector |
multiply(Complex3Vector v)
Returns the vector product of this vector and another.
|
double |
norm()
Returns the l2-norm (magnitude).
|
DoubleVector |
real()
Returns the real part of this complex 3-vector.
|
ComplexVector |
scalarDivide(Complex z)
Returns the division of this vector by a scalar.
|
ComplexVector |
scalarDivide(double x)
Returns the division of this vector by a scalar.
|
ComplexVector |
scalarMultiply(Complex z)
Returns the multiplication of this vector by a scalar.
|
ComplexVector |
scalarMultiply(double x)
Returns the multiplication of this vector by a scalar.
|
Complex |
scalarProduct(Complex3Vector v)
Returns the scalar product of this vector and another.
|
void |
setComponent(int n,
Complex z)
Sets the value of a component of this vector.
|
void |
setComponent(int n,
double x,
double y)
Sets the value of a component of this vector.
|
Complex3Vector |
subtract(Complex3Vector v)
Returns the subtraction of this vector by another.
|
Complex3Vector |
subtract(Double3Vector v)
Returns the subtraction of this vector by another.
|
Complex3Vector |
subtract(Integer3Vector v)
Returns the subtraction of this vector by another.
|
java.lang.String |
toString()
Returns a comma delimited string representing the value of this vector.
|
add, add, add, add, negate, normalize, scalarDivide, scalarMultiply, scalarProduct, scalarProduct, subtract, subtract, subtract, subtractdimension, getInvalidComponentMsgpublic Complex3Vector()
public Complex3Vector(double[] real,
double[] imag)
real - an array of real valuesimag - an array of imaginary valuespublic boolean equals(java.lang.Object a)
equals in class ComplexVectora - a complex 3-vectorpublic java.lang.String toString()
toString in class ComplexVectorpublic int hashCode()
hashCode in class ComplexVectorpublic DoubleVector real()
real in class ComplexVectorpublic DoubleVector imag()
imag in class ComplexVectorpublic Complex getComponent(int n)
getComponent in class ComplexVectorn - index of the vector componentVectorDimensionException - If attempting to access an invalid component.public void setComponent(int n,
Complex z)
setComponent in class ComplexVectorn - index of the vector componentz - a complex numberVectorDimensionException - If attempting to access an invalid component.public void setComponent(int n,
double x,
double y)
setComponent in class ComplexVectorn - index of the vector componentx - the real part of a complex numbery - the imaginary part of a complex numberVectorDimensionException - If attempting to access an invalid component.public double norm()
norm in interface BanachSpace.Membernorm in class ComplexVectorpublic double infNorm()
-norm.infNorm in class ComplexVectorpublic ComplexVector conjugate()
conjugate in class ComplexVectorpublic Complex3Vector add(Complex3Vector v)
v - a complex 3-vectorpublic Complex3Vector add(Double3Vector v)
v - a double 3-vectorpublic Complex3Vector add(Integer3Vector v)
v - an integer 3-vectorpublic Complex3Vector subtract(Complex3Vector v)
v - a complex 3-vectorpublic Complex3Vector subtract(Double3Vector v)
v - a double 3-vectorpublic Complex3Vector subtract(Integer3Vector v)
v - an integer 3-vectorpublic ComplexVector scalarMultiply(Complex z)
scalarMultiply in class ComplexVectorz - a complex numberpublic ComplexVector scalarMultiply(double x)
scalarMultiply in class ComplexVectorx - a doublepublic ComplexVector scalarDivide(Complex z)
scalarDivide in class ComplexVectorz - a complex numberjava.lang.ArithmeticException - If divide by zero.public ComplexVector scalarDivide(double x)
scalarDivide in class ComplexVectorx - a doublejava.lang.ArithmeticException - If divide by zero.public Complex scalarProduct(Complex3Vector v)
v - a complex 3-vectorpublic Complex3Vector multiply(Complex3Vector v)
v - a complex 3-vectorpublic ComplexVector mapComponents(ComplexMapping f)
mapComponents in class ComplexVectorf - a user-defined function