comparison liboctave/dbleQRP.cc @ 1011:18933dbd5e43

[project @ 1995-01-04 04:18:15 by jwe]
author jwe
date Wed, 04 Jan 1995 04:19:24 +0000
parents 714fd17fca28
children b6360f2d4fa6
comparison
equal deleted inserted replaced
1010:bef46882918c 1011:18933dbd5e43
1 // -*- C++ -*- 1 // -*- C++ -*-
2 /* 2 /*
3 3
4 Copyright (C) 1992, 1993, 1994 John W. Eaton 4 Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton
5 5
6 This file is part of Octave. 6 This file is part of Octave.
7 7
8 Octave is free software; you can redistribute it and/or modify it 8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the 9 under the terms of the GNU General Public License as published by the
98 } 98 }
99 99
100 delete [] jpvt; 100 delete [] jpvt;
101 delete [] work; 101 delete [] work;
102 102
103 int m2; 103 int n2;
104 if (qr_type == QR::economy && m > n) 104 if (qr_type == QR::economy && m > n)
105 { 105 {
106 m2 = n; 106 n2 = n;
107 r.resize (n, n, 0.0); 107 r.resize (n, n, 0.0);
108 } 108 }
109 else 109 else
110 { 110 {
111 m2 = m; 111 n2 = m;
112 r.resize (m, n, 0.0); 112 r.resize (m, n, 0.0);
113 } 113 }
114 114
115 for (int j = 0; j < n; j++) 115 for (int j = 0; j < n; j++)
116 { 116 {
124 124
125 F77_FCN (dorgqr) (&m, &m, &min_mn, tmp_data, &m, tau, work, 125 F77_FCN (dorgqr) (&m, &m, &min_mn, tmp_data, &m, tau, work,
126 &lwork, &info); 126 &lwork, &info);
127 127
128 q = Matrix (tmp_data, m, m); 128 q = Matrix (tmp_data, m, m);
129 q.resize (m, n2);
129 130
130 delete [] tau; 131 delete [] tau;
131 delete [] work; 132 delete [] work;
132 } 133 }
133 134