Пример #1
0
        public Complex2D InnerProduct(CVector vec)
        {
            if (Size != vec.Size)
            {
                throw new ArgumentException("The vectors must have the same number of dimensions.");
            }
            Complex2D result = Complex2D.NULL;

            for (int i = 0; i < Size; i++)
            {
                result += vector[i] * vec[i].Conjugate();
            }
            return(result);
        }
Пример #2
0
 public bool Equals(CVector vec)
 {
     return(this.Zip(vec, (x, y) => x == y).Count(x => !x) == 0);
 }
Пример #3
0
 public bool Orthogonal(CVector vec)
 {
     return(InnerProduct(vec) == Complex2D.NULL);
 }