comparison liboctave/array/fMatrix.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
46 #include "DET.h" 46 #include "DET.h"
47 #include "byte-swap.h" 47 #include "byte-swap.h"
48 #include "f77-fcn.h" 48 #include "f77-fcn.h"
49 #include "fMatrix.h" 49 #include "fMatrix.h"
50 #include "floatCHOL.h" 50 #include "floatCHOL.h"
51 #include "floatSCHUR.h" 51 #include "schur.h"
52 #include "floatSVD.h" 52 #include "floatSVD.h"
53 #include "functor.h" 53 #include "functor.h"
54 #include "lo-error.h" 54 #include "lo-error.h"
55 #include "lo-ieee.h" 55 #include "lo-ieee.h"
56 #include "lo-mappers.h" 56 #include "lo-mappers.h"
2968 2968
2969 // FIXME: need to check that a, b, and c are all the same size. 2969 // FIXME: need to check that a, b, and c are all the same size.
2970 2970
2971 // Compute Schur decompositions. 2971 // Compute Schur decompositions.
2972 2972
2973 FloatSCHUR as (a, "U"); 2973 schur<FloatMatrix> as (a, "U");
2974 FloatSCHUR bs (b, "U"); 2974 schur<FloatMatrix> bs (b, "U");
2975 2975
2976 // Transform c to new coordinates. 2976 // Transform c to new coordinates.
2977 2977
2978 FloatMatrix ua = as.unitary_matrix (); 2978 FloatMatrix ua = as.unitary_matrix ();
2979 FloatMatrix sch_a = as.schur_matrix (); 2979 FloatMatrix sch_a = as.schur_matrix ();