Mercurial > octave
comparison liboctave/CmplxQR.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 |
79 tmp_data[m*j+i] *= tau[j]; | 79 tmp_data[m*j+i] *= tau[j]; |
80 } | 80 } |
81 } | 81 } |
82 else | 82 else |
83 { | 83 { |
84 int m2; | 84 int n2; |
85 if (qr_type == QR::economy && m > n) | 85 if (qr_type == QR::economy && m > n) |
86 { | 86 { |
87 m2 = n; | 87 n2 = n; |
88 r.resize (n, n, 0.0); | 88 r.resize (n, n, 0.0); |
89 } | 89 } |
90 else | 90 else |
91 { | 91 { |
92 m2 = m; | 92 n2 = m; |
93 r.resize (m, n, 0.0); | 93 r.resize (m, n, 0.0); |
94 } | 94 } |
95 | 95 |
96 for (int j = 0; j < n; j++) | 96 for (int j = 0; j < n; j++) |
97 { | 97 { |
105 | 105 |
106 F77_FCN (zungqr) (&m, &m, &min_mn, tmp_data, &m, tau, work, | 106 F77_FCN (zungqr) (&m, &m, &min_mn, tmp_data, &m, tau, work, |
107 &lwork, &info); | 107 &lwork, &info); |
108 | 108 |
109 q = ComplexMatrix (tmp_data, m, m); | 109 q = ComplexMatrix (tmp_data, m, m); |
110 q.resize (m, n2); | |
110 | 111 |
111 delete [] tau; | 112 delete [] tau; |
112 delete [] work; | 113 delete [] work; |
113 } | 114 } |
114 } | 115 } |