All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.Complex3Vector

java.lang.Object
   |
   +----JSci.maths.MathVector
           |
           +----JSci.maths.ComplexVector
                   |
                   +----JSci.maths.Complex3Vector

public class Complex3Vector
extends ComplexVector
The Complex3Vector class encapsulates complex 3-vectors.


Constructor Index

 o Complex3Vector()
Constructs an empty 3-vector.
 o Complex3Vector(Complex, Complex, Complex)
Constructs a 3-vector.

Method Index

 o add(Complex3Vector)
Returns the addition of this vector and another.
 o add(Double3Vector)
Returns the addition of this vector and another.
 o add(Integer3Vector)
Returns the addition of this vector and another.
 o add(MathVector)
Returns the addition of this vector and another.
 o conjugate()
Returns the complex conjugate 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 3-vector.
 o infNorm()
Returns the l(infinity)-norm.
 o mapComponents(Mapping)
Applies a function on all the vector components.
 o multiply(Complex3Vector)
Returns the vector product of this vector and another.
 o norm()
Returns the l2-norm (magnitude).
 o real()
Returns the real part of this complex 3-vector.
 o scalarDivide(Complex)
Returns the division of this vector by a scalar.
 o scalarDivide(double)
Returns the division of this vector by a scalar.
 o scalarMultiply(Complex)
Returns the multiplication of this vector by a scalar.
 o scalarMultiply(double)
Returns the multiplication of this vector by a scalar.
 o scalarProduct(Complex3Vector)
Returns the scalar product of this vector and another.
 o setComponent(int, Complex)
Sets the value of a component of this vector.
 o subtract(Complex3Vector)
Returns the subtraction of this vector by another.
 o subtract(Double3Vector)
Returns the subtraction of this vector by another.
 o subtract(Integer3Vector)
Returns the subtraction of this vector by another.
 o subtract(MathVector)
Returns the subtraction of this vector by another.
 o toString()
Returns a comma delimited string representing the value of this vector.

Constructors

 o Complex3Vector
 public Complex3Vector()
Constructs an empty 3-vector.

 o Complex3Vector
 public Complex3Vector(Complex x,
                       Complex y,
                       Complex z)
Constructs a 3-vector.

Parameters:
x - x coordinate
y - y coordinate
z - z coordinate

Methods

 o equals
 public boolean equals(Object a)
Compares two complex vectors for equality.

Parameters:
a - a complex 3-vector
Overrides:
equals in class ComplexVector
 o toString
 public String toString()
Returns a comma delimited string representing the value of this vector.

Overrides:
toString in class ComplexVector
 o hashCode
 public int hashCode()
Returns a hashcode for this vector.

Overrides:
hashCode in class ComplexVector
 o real
 public DoubleVector real()
Returns the real part of this complex 3-vector.

Overrides:
real in class ComplexVector
 o imag
 public DoubleVector imag()
Returns the imaginary part of this complex 3-vector.

Overrides:
imag in class ComplexVector
 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.
Overrides:
getComponent in class ComplexVector
 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.
Overrides:
setComponent in class ComplexVector
 o dimension
 public int dimension()
Returns the vector's dimension.

Overrides:
dimension in class ComplexVector
 o norm
 public double norm()
Returns the l2-norm (magnitude).

Overrides:
norm in class ComplexVector
 o infNorm
 public double infNorm()
Returns the l(infinity)-norm.

Overrides:
infNorm in class ComplexVector
 o conjugate
 public ComplexVector conjugate()
Returns the complex conjugate of this vector.

Returns:
a complex 3-vector
Overrides:
conjugate in class ComplexVector
 o add
 public MathVector add(MathVector v)
Returns the addition of this vector and another.

 o add
 public Complex3Vector add(Complex3Vector v)
Returns the addition of this vector and another.

Parameters:
v - a complex 3-vector
 o add
 public Complex3Vector add(Double3Vector v)
Returns the addition of this vector and another.

Parameters:
v - a double 3-vector
 o add
 public Complex3Vector add(Integer3Vector v)
Returns the addition of this vector and another.

Parameters:
v - an integer 3-vector
 o subtract
 public MathVector subtract(MathVector v)
Returns the subtraction of this vector by another.

 o subtract
 public Complex3Vector subtract(Complex3Vector v)
Returns the subtraction of this vector by another.

Parameters:
v - a complex 3-vector
 o subtract
 public Complex3Vector subtract(Double3Vector v)
Returns the subtraction of this vector by another.

Parameters:
v - a double 3-vector
 o subtract
 public Complex3Vector subtract(Integer3Vector v)
Returns the subtraction of this vector by another.

Parameters:
v - an integer 3-vector
 o scalarMultiply
 public ComplexVector scalarMultiply(Complex z)
Returns the multiplication of this vector by a scalar.

Parameters:
z - a complex number
Returns:
a complex 3-vector
Overrides:
scalarMultiply in class ComplexVector
 o scalarMultiply
 public ComplexVector scalarMultiply(double x)
Returns the multiplication of this vector by a scalar.

Parameters:
x - a double
Returns:
a complex 3-vector
Overrides:
scalarMultiply in class ComplexVector
 o scalarDivide
 public ComplexVector scalarDivide(Complex z)
Returns the division of this vector by a scalar.

Parameters:
z - a complex number
Returns:
a complex 3-vector
Throws: ArithmeticException
If divide by zero.
Overrides:
scalarDivide in class ComplexVector
 o scalarDivide
 public ComplexVector scalarDivide(double x)
Returns the division of this vector by a scalar.

Parameters:
x - a double
Returns:
a complex 3-vector
Throws: ArithmeticException
If divide by zero.
Overrides:
scalarDivide in class ComplexVector
 o scalarProduct
 public Complex scalarProduct(Complex3Vector v)
Returns the scalar product of this vector and another.

Parameters:
v - a complex 3-vector
 o multiply
 public Complex3Vector multiply(Complex3Vector v)
Returns the vector product of this vector and another.

Parameters:
v - a complex 3-vector
 o mapComponents
 public ComplexVector mapComponents(Mapping f)
Applies a function on all the vector components.

Parameters:
f - a user-defined function
Returns:
a complex 3-vector
Overrides:
mapComponents in class ComplexVector

All Packages  Class Hierarchy  This Package  Previous  Next  Index