Exemplo n.º 1
0
 public ComplexVector SetVector(int index, ComplexVector a)
 {
     return new ComplexVector(inner.SetMatrix(index, 0, a.inner));
 }
Exemplo n.º 2
0
        public static Complex Dot(ComplexVector a, ComplexVector b)
        {
            int n = a.Length;
            if (n != b.Length)
            {
                throw new ArgumentException("Dot product undefined. Size mismatch.");
            }

            Complex s = 0.0;
            for (int i = 0; i < n; i++)
            {
                s += a[i] * b[i];
            }

            return s;
        }