Mercurial > octave
comparison libinterp/corefcn/qz.cc @ 21279:eb1524b07fe3
better use of templates for qr classes
* liboctave/numeric/qr.h, liboctave/numeric/qr.cc: New files for qr
classes generated from CmplxQR.cc, CmplxQR.h, base-qr.cc, base-qr.h,
dbleQR.cc, dbleQR.h, fCmplxQR.cc, fCmplxQR.h, floatQR.cc, and
floatQR.h with classes converted to templates.
* liboctave/numeric/module.mk: Update.
* qz.cc, qr.cc, CmplxQRP.cc, CmplxQRP.h, dbleQRP.cc, dbleQRP.h,
fCmplxQRP.cc fCmplxQRP.h, floatQRP.cc, floatQRP.h, mx-defs.h,
mx-ext.h: Use new classes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Feb 2016 02:57:21 -0500 |
parents | fcac5dbbf9ed |
children | 40de9f8f23a6 |
comparison
equal
deleted
inserted
replaced
21278:48d82f74243e | 21279:eb1524b07fe3 |
---|---|
35 #include <cfloat> | 35 #include <cfloat> |
36 | 36 |
37 #include <iostream> | 37 #include <iostream> |
38 #include <iomanip> | 38 #include <iomanip> |
39 | 39 |
40 #include "CmplxQRP.h" | |
41 #include "CmplxQR.h" | |
42 #include "dbleQR.h" | |
43 #include "f77-fcn.h" | 40 #include "f77-fcn.h" |
44 #include "lo-math.h" | 41 #include "lo-math.h" |
42 #include "qr.h" | |
45 #include "quit.h" | 43 #include "quit.h" |
46 | 44 |
47 #include "defun.h" | 45 #include "defun.h" |
48 #include "error.h" | 46 #include "error.h" |
49 #include "errwarn.h" | 47 #include "errwarn.h" |
614 if (complex_case) | 612 if (complex_case) |
615 { | 613 { |
616 // Complex case. | 614 // Complex case. |
617 | 615 |
618 // The QR decomposition of cbb. | 616 // The QR decomposition of cbb. |
619 ComplexQR cbqr (cbb); | 617 qr<ComplexMatrix> cbqr (cbb); |
620 // The R matrix of QR decomposition for cbb. | 618 // The R matrix of QR decomposition for cbb. |
621 cbb = cbqr.R (); | 619 cbb = cbqr.R (); |
622 // (Q*)caa for following work. | 620 // (Q*)caa for following work. |
623 caa = (cbqr.Q ().hermitian ()) * caa; | 621 caa = (cbqr.Q ().hermitian ()) * caa; |
624 CQ = CQ * cbqr.Q (); | 622 CQ = CQ * cbqr.Q (); |
679 #ifdef DEBUG | 677 #ifdef DEBUG |
680 std::cout << "qz: peforming qr decomposition of bb" << std::endl; | 678 std::cout << "qz: peforming qr decomposition of bb" << std::endl; |
681 #endif | 679 #endif |
682 | 680 |
683 // Compute the QR factorization of bb. | 681 // Compute the QR factorization of bb. |
684 QR bqr (bb); | 682 qr<Matrix> bqr (bb); |
685 | 683 |
686 #ifdef DEBUG | 684 #ifdef DEBUG |
687 std::cout << "qz: qr (bb) done; now peforming qz decomposition" | 685 std::cout << "qz: qr (bb) done; now peforming qz decomposition" |
688 << std::endl; | 686 << std::endl; |
689 #endif | 687 #endif |