private void Test_isConj(ILArray <complex> A, ILArray <complex> conjA) { try { if (A.IsEmpty) { if (!conjA.IsEmpty) { throw new Exception("conj of empty array must be empty!"); } else { Success(); return; } } if (!A.Dimensions.IsSameSize(conjA.Dimensions)) { throw new Exception("dimensions must match!"); } if (ILMath.sumall(ILMath.real(A) != ILMath.real(conjA)) > 0.0) { throw new Exception("real parts must match!"); } if (ILMath.sumall(-ILMath.imag(A) != ILMath.imag(conjA)) > 0.0) { throw new Exception("imag parts must be the inverse of each other!"); } Success(); } catch (Exception exc) { Error(exc.Message); } }