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.

Constructor Index

 o ComplexVector(Complex, Complex, Complex)
Constructs a 3D vector.
 o ComplexVector(Complex[])
Constructs a vector by wrapping an array.
 o ComplexVector(int)
Constructs an empty vector.

Method Index

 o clone()
Creates a clone of this vector.
 o dimension()
Returns the vector's dimension.
 o equals(Object)
Compares two complex vectors for equality.
 o getComponent(int)
Returns a component of this vector.
 o hashCode()
Returns a hashcode for this vector.
 o imag()
Returns the imaginary part of this complex vector.
 o infNorm()
Returns the l(infinity)-norm.
 o norm()
Returns the l2-norm (magnitude).
 o real()
Returns the real part of this complex vector.
 o setComponent(int, Complex)
Sets the value of a component of this vector.
 o toString()
Returns a comma delimited string representing the value of this vector.

Constructors

 o ComplexVector
  public ComplexVector(int dim)
Constructs an empty vector.
Parameters:
dim - the dimension of the vector.
 o ComplexVector
  public ComplexVector(Complex array[])
Constructs a vector by wrapping an array.
Parameters:
array - an assigned value
 o ComplexVector
  public ComplexVector(Complex x,
                       Complex y,
                       Complex z)
Constructs a 3D vector.
Parameters:
x - x ordinate
y - y ordinate
z - z ordinate

Methods

 o equals
  public boolean equals(Object a)
Compares two complex vectors for equality.
Parameters:
a - a complex vector
Overrides:
equals in class Object
 o clone
  public Object clone()
Creates a clone of this vector.
Returns:
a copy of this vector.
Overrides:
clone in class Object
 o toString
  public String toString()
Returns a comma delimited string representing the value of this vector.
Overrides:
toString in class Object
 o hashCode
  public int hashCode()
Returns a hashcode for this vector.
Overrides:
hashCode in class Object
 o real
  public DoubleVector real()
Returns the real part of this complex vector.
 o imag
  public DoubleVector imag()
Returns the imaginary part of this complex vector.
 o 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.
 o 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.
 o dimension
  public int dimension()
Returns the vector's dimension.
Overrides:
dimension in class Vector
 o norm
  public double norm()
Returns the l2-norm (magnitude).
Overrides:
norm in class Vector
 o infNorm
  public double infNorm()
Returns the l(infinity)-norm.

All Packages  Class Hierarchy  This Package  Previous  Next  Index