public override void LUSolveFactored(int columnsOfB, Complex[] a, int order, int[] ipiv, Complex[] b) { if (a == null) { throw new ArgumentNullException("a"); } if (ipiv == null) { throw new ArgumentNullException("ipiv"); } if (a.Length != order * order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "a"); } if (ipiv.Length != order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv"); } if (b.Length != columnsOfB * order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "b"); } if (ReferenceEquals(a, b)) { throw new ArgumentException(Resources.ArgumentReferenceDifferent); } SafeNativeMethods.z_lu_solve_factored(order, columnsOfB, a, ipiv, b); }
public override void LUSolveFactored(int columnsOfB, Complex[] a, int order, int[] ipiv, Complex[] b) { if (a == null) { throw new ArgumentNullException("a"); } if (ipiv == null) { throw new ArgumentNullException("ipiv"); } if (a.Length != order * order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "a"); } if (ipiv.Length != order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "ipiv"); } if (b.Length != columnsOfB * order) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "b"); } if (ReferenceEquals(a, b)) { throw new ArgumentException(Resources.ArgumentReferenceDifferent); } var info = SafeNativeMethods.z_lu_solve_factored(order, columnsOfB, a, ipiv, b); if (info == (int)NativeError.MemoryAllocation) { throw new MemoryAllocationException(); } if (info < 0) { throw new InvalidParameterException(Math.Abs(info)); } }
public override void LUSolveFactored(int columnsOfB, Complex[] a, int order, int[] ipiv, Complex[] b) { if (a == null) { throw new ArgumentNullException(nameof(a)); } if (ipiv == null) { throw new ArgumentNullException(nameof(ipiv)); } if (a.Length != order * order) { throw new ArgumentException("The array arguments must have the same length.", nameof(a)); } if (ipiv.Length != order) { throw new ArgumentException("The array arguments must have the same length.", nameof(ipiv)); } if (b.Length != columnsOfB * order) { throw new ArgumentException("The array arguments must have the same length.", nameof(b)); } if (ReferenceEquals(a, b)) { throw new ArgumentException("Arguments must be different objects."); } var info = SafeNativeMethods.z_lu_solve_factored(order, columnsOfB, a, ipiv, b); if (info == (int)NativeError.MemoryAllocation) { throw new MemoryAllocationException(); } if (info < 0) { throw new InvalidParameterException(Math.Abs(info)); } }