Class JSci.maths.ComplexVector
All Packages Class Hierarchy This Package Previous Next Index
Class JSci.maths.ComplexVector
java.lang.Object
|
+----JSci.maths.Tensor
|
+----JSci.maths.Vector
|
+----JSci.maths.ComplexVector
- public final class ComplexVector
- extends Vector
The ComplexVector class provides an object for encapsulating vectors containing complex numbers.
-
ComplexVector(Complex, Complex, Complex)
- Constructs a 3D vector.
-
ComplexVector(Complex[])
- Constructs a vector by wrapping an array.
-
ComplexVector(int)
- Constructs an empty vector.
-
clone()
- Creates a clone of this vector.
-
dimension()
- Returns the vector's dimension.
-
equals(Object)
- Compares two complex vectors for equality.
-
getComponent(int)
- Returns a component of this vector.
-
hashCode()
- Returns a hashcode for this vector.
-
imag()
- Returns the imaginary part of this complex vector.
-
infNorm()
- Returns the l(infinity)-norm.
-
norm()
- Returns the l2-norm (magnitude).
-
real()
- Returns the real part of this complex vector.
-
setComponent(int, Complex)
- Sets the value of a component of this vector.
-
toString()
- Returns a comma delimited string representing the value of this vector.
ComplexVector
public ComplexVector(int dim)
- Constructs an empty vector.
- Parameters:
- dim - the dimension of the vector.
ComplexVector
public ComplexVector(Complex array[])
- Constructs a vector by wrapping an array.
- Parameters:
- array - an assigned value
ComplexVector
public ComplexVector(Complex x,
Complex y,
Complex z)
- Constructs a 3D vector.
- Parameters:
- x - x ordinate
- y - y ordinate
- z - z ordinate
equals
public boolean equals(Object a)
- Compares two complex vectors for equality.
- Parameters:
- a - a complex vector
- Overrides:
- equals in class Object
clone
public Object clone()
- Creates a clone of this vector.
- Returns:
- a copy of this vector.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns a comma delimited string representing the value of this vector.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- Returns a hashcode for this vector.
- Overrides:
- hashCode in class Object
real
public DoubleVector real()
- Returns the real part of this complex vector.
imag
public DoubleVector imag()
- Returns the imaginary part of this complex vector.
getComponent
public Complex getComponent(int n)
- Returns a component of this vector.
- Parameters:
- n - index of the vector component
- Throws: VectorDimensionException
- If attempting to access an invalid component.
setComponent
public void setComponent(int n,
Complex z)
- Sets the value of a component of this vector.
- Parameters:
- n - index of the vector component
- z - a complex number
- Throws: VectorDimensionException
- If attempting to access an invalid component.
dimension
public int dimension()
- Returns the vector's dimension.
- Overrides:
- dimension in class Vector
norm
public double norm()
- Returns the l2-norm (magnitude).
- Overrides:
- norm in class Vector
infNorm
public double infNorm()
- Returns the l(infinity)-norm.
All Packages Class Hierarchy This Package Previous Next Index