Class IVector


  • public class IVector
    extends Object
    Belongs to CDK module:
    qm
    • Field Detail

      • realvector

        public double[] realvector
        The real part of this vector
      • imagvector

        public double[] imagvector
        The imaginary part of this vector
      • size

        public int size
        Size of this vector
    • Constructor Detail

      • IVector

        public IVector​(int size)
        Constructs a vector with "size"-elements
    • Method Detail

      • getSize

        public int getSize()
        Return the size from this vector
      • add

        public void add​(IVector b,
                        IVector result)
        Addition from two vectors
      • sub

        public IVector sub​(IVector b)
        Subtraction from two vectors
      • sub

        public void sub​(IVector b,
                        IVector result)
        Subtraction from two vectors
      • mul

        public IVector mul​(double b)
        Multiplication from a vectors with an double
      • mul

        public void mul​(double b,
                        IVector result)
        Multiplication from a vectors with an double
      • dot

        public Complex dot​(IVector b)
        Multiplication from two vectors
      • duplicate

        public IVector duplicate()
        Copy a vector
      • duplicate

        public void duplicate​(IVector result)
        Copy a vector
      • toString

        public String toString()
        Return a vector as a string
        Overrides:
        toString in class Object
      • reshape

        public void reshape​(int newsize)
        Resize this vector