private d_svd_factor ( [ computeVectors, int m, int n, [ a, [ s, [ u, [ v, [ work, int len ) : int | ||
computeVectors | [ | |
m | int | |
n | int | |
a | [ | |
s | [ | |
u | [ | |
v | [ | |
work | [ | |
len | int | |
return | int |
public override void SingularValueDecomposition(bool computeVectors, double[] a, int rowsA, int columnsA, double[] s, double[] u, double[] vt) { if (a == null) { throw new ArgumentNullException(nameof(a)); } if (s == null) { throw new ArgumentNullException(nameof(s)); } if (u == null) { throw new ArgumentNullException(nameof(u)); } if (vt == null) { throw new ArgumentNullException(nameof(vt)); } if (u.Length != rowsA * rowsA) { throw new ArgumentException("The array arguments must have the same length.", nameof(u)); } if (vt.Length != columnsA * columnsA) { throw new ArgumentException("The array arguments must have the same length.", nameof(vt)); } if (s.Length != Math.Min(rowsA, columnsA)) { throw new ArgumentException("The array arguments must have the same length.", nameof(s)); } var info = SafeNativeMethods.d_svd_factor(computeVectors, rowsA, columnsA, a, s, u, vt); if (info == (int)MklError.MemoryAllocation) { throw new MemoryAllocationException(); } if (info < 0) { throw new InvalidParameterException(Math.Abs(info)); } if (info > 0) { throw new NonConvergenceException(); } }
public override void SingularValueDecomposition(bool computeVectors, double[] a, int rowsA, int columnsA, double[] s, double[] u, double[] vt) { if (a == null) { throw new ArgumentNullException("a"); } if (s == null) { throw new ArgumentNullException("s"); } if (u == null) { throw new ArgumentNullException("u"); } if (vt == null) { throw new ArgumentNullException("vt"); } if (u.Length != rowsA * rowsA) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "u"); } if (vt.Length != columnsA * columnsA) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "vt"); } if (s.Length != Math.Min(rowsA, columnsA)) { throw new ArgumentException(Resources.ArgumentArraysSameLength, "s"); } var info = SafeNativeMethods.d_svd_factor(computeVectors, rowsA, columnsA, a, s, u, vt); if (info == (int)MklError.MemoryAllocation) { throw new MemoryAllocationException(); } if (info < 0) { throw new InvalidParameterException(Math.Abs(info)); } if (info > 0) { throw new NonConvergenceException(); } }