Documentation of 'jsci.maths.vectors.AbstractComplexVector' Java class
AbstractComplexVector
jsci.maths.vectors

Class AbstractComplexVector

    • Method Detail

      • equals

        public final boolean equals(java.lang.Object obj)
        Compares two complex vectors for equality. Two vectors are considered to be equal if the norm of their difference is within the zero tolerance.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - a complex vector
      • equals

        public boolean equals(java.lang.Object obj,
                              double tol)
      • toString

        public java.lang.String toString()
        Returns a comma delimited string representing the value of this vector.
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Returns a hashcode for this vector.
        Overrides:
        hashCode in class java.lang.Object
      • imag

        public abstract AbstractDoubleVector imag()
        Returns the imaginary part of this complex vector.
      • getComponent

        public abstract 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.
      • getRealComponent

        public abstract double getRealComponent(int n)
      • getImagComponent

        public abstract double getImagComponent(int n)
      • setComponent

        public abstract void setComponent(int n,
                                          Complex z)
        Sets the value of a component of this vector. Should only be used to initialise this vector.
        Parameters:
        n - index of the vector component
        z - a complex number
        Throws:
        VectorDimensionException - If attempting to access an invalid component.
      • setComponent

        public abstract void setComponent(int n,
                                          double x,
                                          double y)
        Sets the value of a component of this vector. Should only be used to initialise this vector.
        Parameters:
        n - index of the vector component
        x - the real part of a complex number
        y - the imaginary part of a complex number
        Throws:
        VectorDimensionException - If attempting to access an invalid component.
      • getSet

        public java.lang.Object getSet()
        Specified by:
        getSet in interface Member
      • infNorm

        public double infNorm()
        Returns the linfinity-norm.
      • conjugate

        public abstract AbstractComplexVector conjugate()
        Returns the complex conjugate of this vector.
      • scalarMultiply

        public abstract AbstractComplexVector scalarMultiply(Complex z)
        Returns the multiplication of this vector by a scalar.
        Parameters:
        z - a complex number
      • scalarMultiply

        public abstract AbstractComplexVector scalarMultiply(double x)
        Returns the multiplication of this vector by a scalar.
        Parameters:
        x - a double
      • scalarDivide

        public abstract AbstractComplexVector scalarDivide(Complex z)
        Returns the division of this vector by a scalar.
        Parameters:
        z - a complex number
        Throws:
        java.lang.ArithmeticException - If divide by zero.
      • scalarDivide

        public abstract AbstractComplexVector scalarDivide(double x)
        Returns the division of this vector by a scalar.
        Parameters:
        x - a double
        Throws:
        java.lang.ArithmeticException - If divide by zero.
      • normalize

        public AbstractComplexVector normalize()
        Returns a normalised vector (a vector with norm equal to one).
      • mapComponents

        public abstract AbstractComplexVector mapComponents(ComplexMapping f)
        Applies a function on all the vector components.
        Parameters:
        f - a user-defined function
        Returns:
        a complex vector

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.