    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.

##

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

##

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

##

Complex3Vector

     public Complex3Vector()

  Constructs an empty 3-vector.

Complex3Vector

     public Complex3Vector(Complex x,
                           Complex y,
                           Complex z)

  Constructs a 3-vector.

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

##

equals

     public boolean equals(Object a)

  Compares two complex vectors for equality.

  Parameters:
    a - a complex 3-vector
  Overrides:
    equals in class ComplexVector

toString

     public String toString()

  Returns a comma delimited string representing the value of this vector.

  Overrides:
    toString in class ComplexVector

hashCode

     public int hashCode()

  Returns a hashcode for this vector.

  Overrides:
    hashCode in class ComplexVector

real

     public DoubleVector real()

  Returns the real part of this complex 3-vector.

  Overrides:
    real in class ComplexVector

imag

     public DoubleVector imag()

  Returns the imaginary part of this complex 3-vector.

  Overrides:
    imag in class ComplexVector

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

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

dimension

     public int dimension()

  Returns the vector's dimension.

  Overrides:
    dimension in class ComplexVector

norm

     public double norm()

  Returns the l2-norm (magnitude).

  Overrides:
    norm in class ComplexVector

infNorm

     public double infNorm()

  Returns the l(infinity)-norm.

  Overrides:
    infNorm in class ComplexVector

conjugate

     public ComplexVector conjugate()

  Returns the complex conjugate of this vector.

  Returns:
    a complex 3-vector
  Overrides:
    conjugate in class ComplexVector

add

     public MathVector add(MathVector v)

  Returns the addition of this vector and another.

add

     public Complex3Vector add(Complex3Vector v)

  Returns the addition of this vector and another.

  Parameters:
    v - a complex 3-vector

add

     public Complex3Vector add(Double3Vector v)

  Returns the addition of this vector and another.

  Parameters:
    v - a double 3-vector

add

     public Complex3Vector add(Integer3Vector v)

  Returns the addition of this vector and another.

  Parameters:
    v - an integer 3-vector

subtract

     public MathVector subtract(MathVector v)

  Returns the subtraction of this vector by another.

subtract

     public Complex3Vector subtract(Complex3Vector v)

  Returns the subtraction of this vector by another.

  Parameters:
    v - a complex 3-vector

subtract

     public Complex3Vector subtract(Double3Vector v)

  Returns the subtraction of this vector by another.

  Parameters:
    v - a double 3-vector

subtract

     public Complex3Vector subtract(Integer3Vector v)

  Returns the subtraction of this vector by another.

  Parameters:
    v - an integer 3-vector

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

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

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

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

scalarProduct

     public Complex scalarProduct(Complex3Vector v)

  Returns the scalar product of this vector and another.

  Parameters:
    v - a complex 3-vector

multiply

     public Complex3Vector multiply(Complex3Vector v)

  Returns the vector product of this vector and another.

  Parameters:
    v - a complex 3-vector

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