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); }
public bool Equals(CVector vec) { return(this.Zip(vec, (x, y) => x == y).Count(x => !x) == 0); }
public bool Orthogonal(CVector vec) { return(InnerProduct(vec) == Complex2D.NULL); }