Class ComplexVector

    • Field Detail

      • XML

        protected static final javolution.xml.XMLFormat<ComplexVector> XML
        Holds the default XML representation. For example: [code] [/code]
    • Method Detail

      • valueOf

        public static ComplexVector valueOf​(Complex... elements)
        Returns a new vector holding the specified complex numbers.
        Parameters:
        elements - the complex numbers elements.
        Returns:
        the vector having the specified complex numbers.
      • valueOf

        public static ComplexVector valueOf​(List<Complex> elements)
        Returns a new vector holding the elements from the specified collection.
        Parameters:
        elements - the collection of floating-points numbers.
        Returns:
        the vector having the specified elements.
      • valueOf

        public static ComplexVector valueOf​(Vector<Complex> that)
        Returns a ComplexVector instance equivalent to the specified vector.
        Parameters:
        that - the vector to convert.
        Returns:
        that or new equivalent ComplexVector.
      • getReal

        public double getReal​(int i)
        Returns the real value of a complex number from this vector (fast).
        Parameters:
        i - the complex number index.
        Returns:
        the real value of complex at i.
        Throws:
        IndexOutOfBoundsException - (i < 0) || (i >= dimension())
      • getImaginary

        public double getImaginary​(int i)
        Returns the imaginary value of a complex number from this vector (fast).
        Parameters:
        i - the complex number index.
        Returns:
        the real value of complex at i.
        Throws:
        IndexOutOfBoundsException - (i < 0) || (i >= dimension())
      • getDimension

        public int getDimension()
        Description copied from class: Vector
        Returns the number of elements held by this vector.
        Specified by:
        getDimension in class Vector<Complex>
        Returns:
        this vector dimension.
      • get

        public Complex get​(int i)
        Description copied from class: Vector
        Returns a single element from this vector.
        Specified by:
        get in class Vector<Complex>
        Parameters:
        i - the element index (range [0..n[).
        Returns:
        the element at i.
      • minus

        public ComplexVector minus​(Vector<Complex> that)
        Description copied from class: Vector
        Returns the difference between this vector and the one specified.
        Overrides:
        minus in class Vector<Complex>
        Parameters:
        that - the vector to be subtracted.
        Returns:
        this - that.
      • copy

        public ComplexVector copy()
        Description copied from class: Vector
        Returns a copy of this vector allocated by the calling thread (possibly on the stack).
        Specified by:
        copy in interface javolution.lang.ValueType
        Specified by:
        copy in class Vector<Complex>
        Returns:
        an identical and independant copy of this matrix.