Mercurial > octave
comparison liboctave/dbleQR.cc @ 1253:bb67a902760b
[project @ 1995-04-11 16:35:23 by jwe]
author | jwe |
---|---|
date | Tue, 11 Apr 1995 16:35:23 +0000 |
parents | 97eac19837dc |
children | f93b7fa5e113 |
comparison
equal
deleted
inserted
replaced
1252:ccb22498f289 | 1253:bb67a902760b |
---|---|
30 #include "lo-error.h" | 30 #include "lo-error.h" |
31 #include "f77-uscore.h" | 31 #include "f77-uscore.h" |
32 | 32 |
33 extern "C" | 33 extern "C" |
34 { | 34 { |
35 int F77_FCN (dgeqrf) (const int&, const int&, double*, const int&, | 35 int F77_FCN (dgeqrf, DGEQRF) (const int&, const int&, double*, |
36 double*, double*, const int&, int&); | 36 const int&, double*, double*, |
37 const int&, int&); | |
37 | 38 |
38 int F77_FCN (dorgqr) (const int&, const int&, const int&, double*, | 39 int F77_FCN (dorgqr, DORGQR) (const int&, const int&, const int&, |
39 const int&, double*, double*, const int&, int&); | 40 double*, const int&, double*, double*, |
41 const int&, int&); | |
40 } | 42 } |
41 | 43 |
42 QR::QR (const Matrix& a, QR::type qr_type) | 44 QR::QR (const Matrix& a, QR::type qr_type) |
43 { | 45 { |
44 int m = a.rows (); | 46 int m = a.rows (); |
63 copy (tmp_data, a.data (), a.length ()); | 65 copy (tmp_data, a.data (), a.length ()); |
64 } | 66 } |
65 else | 67 else |
66 tmp_data = dup (a.data (), a.length ()); | 68 tmp_data = dup (a.data (), a.length ()); |
67 | 69 |
68 F77_FCN (dgeqrf) (m, n, tmp_data, m, tau, work, lwork, info); | 70 F77_FCN (dgeqrf, DGEQRF) (m, n, tmp_data, m, tau, work, lwork, info); |
69 | 71 |
70 delete [] work; | 72 delete [] work; |
71 | 73 |
72 if (qr_type == QR::raw) | 74 if (qr_type == QR::raw) |
73 { | 75 { |
100 } | 102 } |
101 | 103 |
102 lwork = 32*m; | 104 lwork = 32*m; |
103 work = new double[lwork]; | 105 work = new double[lwork]; |
104 | 106 |
105 F77_FCN (dorgqr) (m, m, min_mn, tmp_data, m, tau, work, lwork, info); | 107 F77_FCN (dorgqr, DORGQR) (m, m, min_mn, tmp_data, m, tau, work, |
108 lwork, info); | |
106 | 109 |
107 q = Matrix (tmp_data, m, m); | 110 q = Matrix (tmp_data, m, m); |
108 q.resize (m, n2); | 111 q.resize (m, n2); |
109 | 112 |
110 delete [] tau; | 113 delete [] tau; |