z_qr_thin_factor() private method

private z_qr_thin_factor ( int m, int n, [ q, [ tau, [ r, [ work, int len ) : int
m int
n int
q [
tau [
r [
work [
len int
return int
Beispiel #1
0
        public override void ThinQRFactor(Complex[] q, int rowsA, int columnsA, Complex[] r, Complex[] 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.z_qr_thin_factor(rowsA, columnsA, q, tau, r);

            if (info < 0)
            {
                throw new InvalidParameterException(Math.Abs(info));
            }
        }
Beispiel #2
0
        public override void ThinQRFactor(Complex[] q, int rowsA, int columnsA, Complex[] r, Complex[] 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.z_qr_thin_factor(rowsA, columnsA, q, tau, r);

            if (info < 0)
            {
                throw new InvalidParameterException(Math.Abs(info));
            }
        }