comparison liboctave/array/CMatrix.cc @ 21266:e69eaee28737

make better use of templates for Schur decomposition * liboctave/numeric/schur.h, liboctave/numeric/schur.cc: New files generated from SCHUR.h, SCHUR.cc, CmplxSCHUR.h, CmplxSCHUR.cc, dbleSCHUR.h, dbleSCHUR.cc, fCmplxSCHUR.h, fCmplxSCHUR.cc, floatSCHUR.h, and floatSCHUR.cc and making them templates. * liboctave/numeric/module.mk: Update. * libinterp/corefcn/schur.cc, sqrtm.cc, CMatrix.cc, dMatrix.cc, fCMatrix.cc, fMatrix.cc, mx-defs.h, mx-ext.h: Use new template classes and header file.
author John W. Eaton <jwe@octave.org>
date Mon, 15 Feb 2016 20:06:12 -0500
parents f7121e111991
children 3c8a3d35661a
comparison
equal deleted inserted replaced
21265:f780d057a3ec 21266:e69eaee28737
44 #include "CRowVector.h" 44 #include "CRowVector.h"
45 #include "dRowVector.h" 45 #include "dRowVector.h"
46 #include "CDiagMatrix.h" 46 #include "CDiagMatrix.h"
47 #include "dDiagMatrix.h" 47 #include "dDiagMatrix.h"
48 #include "CmplxCHOL.h" 48 #include "CmplxCHOL.h"
49 #include "CmplxSCHUR.h" 49 #include "schur.h"
50 #include "CmplxSVD.h" 50 #include "CmplxSVD.h"
51 #include "DET.h" 51 #include "DET.h"
52 #include "f77-fcn.h" 52 #include "f77-fcn.h"
53 #include "functor.h" 53 #include "functor.h"
54 #include "lo-error.h" 54 #include "lo-error.h"
3485 3485
3486 // FIXME: need to check that a, b, and c are all the same size. 3486 // FIXME: need to check that a, b, and c are all the same size.
3487 3487
3488 // Compute Schur decompositions 3488 // Compute Schur decompositions
3489 3489
3490 ComplexSCHUR as (a, "U"); 3490 schur<ComplexMatrix> as (a, "U");
3491 ComplexSCHUR bs (b, "U"); 3491 schur<ComplexMatrix> bs (b, "U");
3492 3492
3493 // Transform c to new coordinates. 3493 // Transform c to new coordinates.
3494 3494
3495 ComplexMatrix ua = as.unitary_matrix (); 3495 ComplexMatrix ua = as.unitary_matrix ();
3496 ComplexMatrix sch_a = as.schur_matrix (); 3496 ComplexMatrix sch_a = as.schur_matrix ();