|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.vectors.MathVector JSci.maths.vectors.AbstractComplexVector
The AbstractComplexVector class encapsulates vectors containing complex numbers.
Field Summary |
Fields inherited from class JSci.maths.vectors.MathVector |
N |
Constructor Summary | |
protected |
AbstractComplexVector(int dim)
|
Method Summary | |
abstract AbstractComplexVector |
add(AbstractComplexVector v)
Returns the addition of this vector and another. |
abstract AbstractComplexVector |
conjugate()
Returns the complex conjugate of this vector. |
boolean |
equals(java.lang.Object obj)
Compares two complex vectors for equality. |
abstract Complex |
getComponent(int n)
Returns a component of this vector. |
abstract double |
getImagComponent(int n)
|
abstract double |
getRealComponent(int n)
|
int |
hashCode()
Returns a hashcode for this vector. |
abstract AbstractDoubleVector |
imag()
Returns the imaginary part of this complex vector. |
double |
infNorm()
Returns the l-norm. |
abstract AbstractComplexVector |
mapComponents(ComplexMapping f)
Applies a function on all the vector components. |
double |
norm()
Returns the l2-norm (magnitude). |
AbstractComplexVector |
normalize()
Returns a normalised vector (a vector with norm equal to one). |
abstract AbstractDoubleVector |
real()
Returns the real part of this complex vector. |
abstract AbstractComplexVector |
scalarDivide(Complex z)
Returns the division of this vector by a scalar. |
abstract AbstractComplexVector |
scalarDivide(double x)
Returns the division of this vector by a scalar. |
abstract AbstractComplexVector |
scalarMultiply(Complex z)
Returns the multiplication of this vector by a scalar. |
abstract AbstractComplexVector |
scalarMultiply(double x)
Returns the multiplication of this vector by a scalar. |
abstract Complex |
scalarProduct(AbstractComplexVector v)
Returns the scalar product of this vector and another. |
abstract void |
setComponent(int n,
Complex z)
Sets the value of a component of this vector. |
abstract void |
setComponent(int n,
double x,
double y)
Sets the value of a component of this vector. |
abstract AbstractComplexVector |
subtract(AbstractComplexVector v)
Returns the subtraction of this vector by another. |
java.lang.String |
toString()
Returns a comma delimited string representing the value of this vector. |
Methods inherited from class JSci.maths.vectors.MathVector |
dimension, getInvalidComponentMsg |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface JSci.maths.algebras.HilbertSpace.Member |
scalarProduct |
Methods inherited from interface JSci.maths.algebras.VectorSpace.Member |
scalarDivide |
Methods inherited from interface JSci.maths.algebras.Module.Member |
scalarMultiply |
Methods inherited from interface JSci.maths.groups.AbelianGroup.Member |
add, negate, subtract |
Constructor Detail |
protected AbstractComplexVector(int dim)
Method Detail |
public boolean equals(java.lang.Object obj)
obj
- a complex vectorpublic java.lang.String toString()
public int hashCode()
public abstract AbstractDoubleVector real()
public abstract AbstractDoubleVector imag()
public abstract Complex getComponent(int n)
n
- index of the vector component
VectorDimensionException
- If attempting to access an invalid component.public abstract double getRealComponent(int n)
public abstract double getImagComponent(int n)
public abstract void setComponent(int n, Complex z)
n
- index of the vector componentz
- a complex number
VectorDimensionException
- If attempting to access an invalid component.public abstract void setComponent(int n, double x, double y)
n
- index of the vector componentx
- the real part of a complex numbery
- the imaginary part of a complex number
VectorDimensionException
- If attempting to access an invalid component.public double norm()
norm
in interface BanachSpace.Member
norm
in class MathVector
public double infNorm()
public abstract AbstractComplexVector conjugate()
public abstract AbstractComplexVector add(AbstractComplexVector v)
v
- a complex vector
VectorDimensionException
- If the vectors are different sizes.public abstract AbstractComplexVector subtract(AbstractComplexVector v)
v
- a complex vector
VectorDimensionException
- If the vectors are different sizes.public abstract AbstractComplexVector scalarMultiply(Complex z)
z
- a complex numberpublic abstract AbstractComplexVector scalarMultiply(double x)
x
- a doublepublic abstract AbstractComplexVector scalarDivide(Complex z)
z
- a complex number
java.lang.ArithmeticException
- If divide by zero.public abstract AbstractComplexVector scalarDivide(double x)
x
- a double
java.lang.ArithmeticException
- If divide by zero.public AbstractComplexVector normalize()
public abstract Complex scalarProduct(AbstractComplexVector v)
v
- a complex vector
VectorDimensionException
- If the vectors are different sizes.public abstract AbstractComplexVector mapComponents(ComplexMapping f)
f
- a user-defined function
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |