ComplexVector2D
vmm3d.pseudospherical

Class ComplexVector2D



  • public class ComplexVector2Dextends Object
    A 2D vector with components of type Complex named x, y.
    • Field Detail

      • x

        public Complex x
        The first component of the vector.
      • y

        public Complex y
        The second component of the vector.
    • Constructor Detail

      • ComplexVector2D

        public ComplexVector2D()
        Construct a vector with all components initially equal to zero.
      • ComplexVector2D

        public ComplexVector2D(Complex x,               Complex y)
        Construct a vector that initially has coordinates (x,y).
      • ComplexVector2D

        public ComplexVector2D(ComplexVector2D v)
        Construct a vector that is initially a copy of a specified vector.
        Parameters:
        v - the constructed vector is (v.x, v.y), or is (ZERO_C,ZERO_C) if v is null.
    • Method Detail

      • equals

        public boolean equals(Object obj)
        Returns true obj is a non-null object whose class in Vector2D and such that both coordinates of the vector obj are the same as the coordinates of this vector.
        Overrides:
        equals in class Object
      • negate

        public void negate()
        Multiplies each component of this vector by -1. This method modifies the vector.
      • plus

        public ComplexVector2D plus(ComplexVector2D v)
        Returns the vector sum of this vector and v. A new vector object is constructed to contain the result; neither input vector is modified.
        Parameters:
        v - a non-null vector
      • minus

        public ComplexVector2D minus(ComplexVector2D v)
        Returns the vector difference of this vector and v. A new vector object is constructed to contain the result; neither input vector is modified.
        Parameters:
        v - a non-null vector
      • times

        public ComplexVector2D times(Complex d)
        Returns the scalar product of this vector times d. A new vector object is constructed to contain the result; the vector is not modified.
        Parameters:
        d - the scalar that is to be multiplied times this vector
      • norm2

        public double norm2()
        Returns the norm square of the vector. The norm is calculated by sqrt(|x|^2+|y|^2)
      • toString

        public String toString()
        Returns a string representation of this vector of the form "(x,y)" where x, y are the numerical components of the vector.
        Overrides:
        toString in class Object

SCaVis 2.1 © jWork.ORG