Documentation of 'vmm3d.core3D.ComplexVector3D' Java class
ComplexVector3D
vmm3d.core3D

Class ComplexVector3D



  • public class ComplexVector3D
    extends java.lang.Object
    A 3D vector with components of type Complex named x, y, and z.
    • Field Detail

      • x

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

        public Complex y
        The second component of the vector.
      • z

        public Complex z
        The third component of the vector.
      • ORIGIN

        public static final ComplexVector3D ORIGIN
        The origin, (ZERO_C,ZERO_C,ZERO_C).
      • UNIT_X

        public static final ComplexVector3D UNIT_X
        The unit vector in the x direction, (ONE_C,ZERO_C,ZERO_C).
      • UNIT_Y

        public static final ComplexVector3D UNIT_Y
        The unit vector in the y direction, (ZERO_C,ONE_C,ZERO_C).
      • UNIT_Z

        public static final ComplexVector3D UNIT_Z
        The uint vector in the z direction, (ZERO_C,ZERO_C,ONE_C).
    • Constructor Detail

      • ComplexVector3D

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

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

        public ComplexVector3D(Vector3D rea,
                               Vector3D ima)
        Construct a vector that initially has real part rea and imaginary part ima.
      • ComplexVector3D

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

      • equals

        public boolean equals(java.lang.Object obj)
        Returns true if obj is a non-null object whose class in ComplexVector3D and such that the three corrdinates of the vector obj are the same as the coordinates of this vector.
        Overrides:
        equals in class java.lang.Object
      • re

        public Vector3D re()
        The real part of a ComplexVector.
      • im

        public Vector3D im()
        The imaginary part of a ComplexVector.
      • norm

        public double norm()
        Returns the length of this vector, computed as Math.sqrt(x*x+y*y+z*z)
      • normalize

        public void normalize()
        Divides each component of the vector by the norm of the vector, giving a vector that has length 1. However, if the vector is zero, or if any of its components are infinite or undefined, then the result of calling this method is to set all the components of the vector to Double.NaN. This method modifies the vector.
      • negate

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

        public ComplexVector3D plus(ComplexVector3D 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 ComplexVector3D minus(ComplexVector3D 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 ComplexVector3D 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
      • assignTimes

        public void assignTimes(Complex d)
        This vector is scalar multiplied by d. No new object is constructed.
      • assignTimes

        public void assignTimes(double r)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.