public override void ThinQRFactor(float[] q, int rowsA, int columnsA, float[] r, float[] tau) { if (r == null) { throw new ArgumentNullException("r"); } if (q == null) { throw new ArgumentNullException("q"); } if (q.Length != rowsA * columnsA) { throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * columnsR"), "q"); } if (tau.Length < Math.Min(rowsA, columnsA)) { throw new ArgumentException(string.Format(Resources.ArrayTooSmall, "min(m,n)"), "tau"); } if (r.Length != columnsA * columnsA) { throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "columnsA * columnsA"), "r"); } var work = new float[columnsA * Control.BlockSize]; SafeNativeMethods.s_qr_thin_factor(rowsA, columnsA, q, tau, r, work, work.Length); }
public override void ThinQRFactor(float[] q, int rowsA, int columnsA, float[] r, float[] tau) { if (r == null) { throw new ArgumentNullException("r"); } if (q == null) { throw new ArgumentNullException("q"); } if (q.Length != rowsA * columnsA) { throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "rowsR * columnsR"), "q"); } if (tau.Length < Math.Min(rowsA, columnsA)) { throw new ArgumentException(string.Format(Resources.ArrayTooSmall, "min(m,n)"), "tau"); } if (r.Length != columnsA * columnsA) { throw new ArgumentException(string.Format(Resources.ArgumentArrayWrongLength, "columnsA * columnsA"), "r"); } var info = SafeNativeMethods.s_qr_thin_factor(rowsA, columnsA, q, tau, r); if (info < 0) { throw new InvalidParameterException(Math.Abs(info)); } }
public override void ThinQRFactor(float[] q, int rowsA, int columnsA, float[] r, float[] tau) { if (r == null) { throw new ArgumentNullException(nameof(r)); } if (q == null) { throw new ArgumentNullException(nameof(q)); } if (q.Length != rowsA * columnsA) { throw new ArgumentException("The given array has the wrong length. Should be rowsR * columnsR.", nameof(q)); } if (tau.Length < Math.Min(rowsA, columnsA)) { throw new ArgumentException("The given array is too small. It must be at least min(m,n) long.", nameof(tau)); } if (r.Length != columnsA * columnsA) { throw new ArgumentException("The given array has the wrong length. Should be columnsA * columnsA.", nameof(r)); } var info = SafeNativeMethods.s_qr_thin_factor(rowsA, columnsA, q, tau, r); if (info < 0) { throw new InvalidParameterException(Math.Abs(info)); } }