Mercurial > jwe > octave
comparison liboctave/numeric/eigs-base.cc @ 21139:538b57866b90
consistently use "typename" intead of "class" in template declarations
* Object.h, QtHandlesUtils.cc, QtHandlesUtils.h, ToolBarButton.cc,
ToolBarButton.h, Cell.h, __lin_interpn__.cc, bitfcns.cc, bsxfun.cc,
cellfun.cc, data.cc, filter.cc, gcd.cc, graphics.cc, help.cc, kron.cc,
lookup.cc, ls-mat5.cc, ls-oct-text.h, lu.cc, max.cc, mgorth.cc,
oct-map.cc, oct-map.h, oct-stream.cc, oct-stream.h, octave-link.h,
pr-output.cc, profiler.h, schur.cc, sparse-xdiv.cc, sparse-xpow.cc,
sqrtm.cc, symtab.h, tril.cc, typecast.cc, variables.cc, xdiv.cc,
zfstream.h, __init_fltk__.cc, __magick_read__.cc, chol.cc, qr.cc,
ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc, ov-base-int.h,
ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc, ov-base-scalar.h,
ov-base-sparse.cc, ov-base-sparse.h, ov-base.h, ov-classdef.cc,
ov-int-traits.h, ov-java.h, ov-usr-fcn.h, ov.cc, ov.h,
op-dms-template.cc, oct-parse.in.yy, parse.h, pt-mat.cc, Array-b.cc,
Array.cc, Array.h, CDiagMatrix.h, CMatrix.h, CNDArray.h,
DiagArray2.cc, DiagArray2.h, MArray.cc, MArray.h, MDiagArray2.cc,
MDiagArray2.h, MSparse.cc, MSparse.h, MatrixType.cc, Sparse.cc,
Sparse.h, dDiagMatrix.h, dMatrix.h, dNDArray.h, fCDiagMatrix.h,
fCMatrix.h, fCNDArray.h, fDiagMatrix.h, fMatrix.h, fNDArray.h,
idx-vector.cc, idx-vector.h, intNDArray.cc, intNDArray.h, DET.h,
base-aepbal.h, base-lu.cc, base-lu.h, base-qr.cc, base-qr.h,
bsxfun-defs.cc, eigs-base.cc, lo-mappers.h, lo-specfun.cc,
lo-specfun.h, oct-convn.cc, oct-fftw.cc, oct-norm.cc,
sparse-base-chol.cc, sparse-base-chol.h, sparse-base-lu.cc,
sparse-base-lu.h, sparse-dmsolve.cc, mx-inlines.cc,
action-container.h, base-list.h, lo-traits.h, lo-utils.h,
oct-base64.h, oct-binmap.h, oct-cmplx.h, oct-inttypes.cc,
oct-inttypes.h, oct-locbuf.h, oct-refcount.h, oct-sort.cc, oct-sort.h:
Use "typename" instead of "class" in template declarations.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 24 Jan 2016 13:50:04 -0500 |
parents | 7cac4e7458f2 |
children | 307096fb67e1 |
comparison
equal
deleted
inserted
replaced
21138:e2fca7d79169 | 21139:538b57866b90 |
---|---|
214 ("Octave:convergence", | 214 ("Octave:convergence", |
215 "eigs: 'A - sigma*B' is singular, indicating sigma is exactly " | 215 "eigs: 'A - sigma*B' is singular, indicating sigma is exactly " |
216 "an eigenvalue so convergence is not guaranteed"); | 216 "an eigenvalue so convergence is not guaranteed"); |
217 } | 217 } |
218 | 218 |
219 template <class M, class SM> | 219 template <typename M, typename SM> |
220 static octave_idx_type | 220 static octave_idx_type |
221 lusolve (const SM& L, const SM& U, M& m) | 221 lusolve (const SM& L, const SM& U, M& m) |
222 { | 222 { |
223 octave_idx_type err = 0; | 223 octave_idx_type err = 0; |
224 double rcond; | 224 double rcond; |
232 m = U.solve (utyp, m, err, rcond, 0); | 232 m = U.solve (utyp, m, err, rcond, 0); |
233 | 233 |
234 return err; | 234 return err; |
235 } | 235 } |
236 | 236 |
237 template <class SM, class M> | 237 template <typename SM, typename M> |
238 static M | 238 static M |
239 ltsolve (const SM& L, const ColumnVector& Q, const M& m) | 239 ltsolve (const SM& L, const ColumnVector& Q, const M& m) |
240 { | 240 { |
241 octave_idx_type n = L.cols (); | 241 octave_idx_type n = L.cols (); |
242 octave_idx_type b_nc = m.cols (); | 242 octave_idx_type b_nc = m.cols (); |
259 } | 259 } |
260 | 260 |
261 return retval; | 261 return retval; |
262 } | 262 } |
263 | 263 |
264 template <class SM, class M> | 264 template <typename SM, typename M> |
265 static M | 265 static M |
266 utsolve (const SM& U, const ColumnVector& Q, const M& m) | 266 utsolve (const SM& U, const ColumnVector& Q, const M& m) |
267 { | 267 { |
268 octave_idx_type n = U.cols (); | 268 octave_idx_type n = U.cols (); |
269 octave_idx_type b_nc = m.cols (); | 269 octave_idx_type b_nc = m.cols (); |
747 warn_convergence (); | 747 warn_convergence (); |
748 | 748 |
749 return true; | 749 return true; |
750 } | 750 } |
751 | 751 |
752 template <class M> | 752 template <typename M> |
753 octave_idx_type | 753 octave_idx_type |
754 EigsRealSymmetricMatrix (const M& m, const std::string typ, | 754 EigsRealSymmetricMatrix (const M& m, const std::string typ, |
755 octave_idx_type k, octave_idx_type p, | 755 octave_idx_type k, octave_idx_type p, |
756 octave_idx_type &info, Matrix &eig_vec, | 756 octave_idx_type &info, Matrix &eig_vec, |
757 ColumnVector &eig_val, const M& _b, | 757 ColumnVector &eig_val, const M& _b, |
1017 (*current_liboctave_error_handler) ("eigs: error %d in dseupd", info2); | 1017 (*current_liboctave_error_handler) ("eigs: error %d in dseupd", info2); |
1018 | 1018 |
1019 return ip(4); | 1019 return ip(4); |
1020 } | 1020 } |
1021 | 1021 |
1022 template <class M> | 1022 template <typename M> |
1023 octave_idx_type | 1023 octave_idx_type |
1024 EigsRealSymmetricMatrixShift (const M& m, double sigma, | 1024 EigsRealSymmetricMatrixShift (const M& m, double sigma, |
1025 octave_idx_type k, octave_idx_type p, | 1025 octave_idx_type k, octave_idx_type p, |
1026 octave_idx_type &info, Matrix &eig_vec, | 1026 octave_idx_type &info, Matrix &eig_vec, |
1027 ColumnVector &eig_val, const M& _b, | 1027 ColumnVector &eig_val, const M& _b, |
1541 (*current_liboctave_error_handler) ("eigs: error %d in dseupd", info2); | 1541 (*current_liboctave_error_handler) ("eigs: error %d in dseupd", info2); |
1542 | 1542 |
1543 return ip(4); | 1543 return ip(4); |
1544 } | 1544 } |
1545 | 1545 |
1546 template <class M> | 1546 template <typename M> |
1547 octave_idx_type | 1547 octave_idx_type |
1548 EigsRealNonSymmetricMatrix (const M& m, const std::string typ, | 1548 EigsRealNonSymmetricMatrix (const M& m, const std::string typ, |
1549 octave_idx_type k, octave_idx_type p, | 1549 octave_idx_type k, octave_idx_type p, |
1550 octave_idx_type &info, ComplexMatrix &eig_vec, | 1550 octave_idx_type &info, ComplexMatrix &eig_vec, |
1551 ComplexColumnVector &eig_val, const M& _b, | 1551 ComplexColumnVector &eig_val, const M& _b, |
1859 (*current_liboctave_error_handler) ("eigs: error %d in dneupd", info2); | 1859 (*current_liboctave_error_handler) ("eigs: error %d in dneupd", info2); |
1860 | 1860 |
1861 return ip(4); | 1861 return ip(4); |
1862 } | 1862 } |
1863 | 1863 |
1864 template <class M> | 1864 template <typename M> |
1865 octave_idx_type | 1865 octave_idx_type |
1866 EigsRealNonSymmetricMatrixShift (const M& m, double sigmar, | 1866 EigsRealNonSymmetricMatrixShift (const M& m, double sigmar, |
1867 octave_idx_type k, octave_idx_type p, | 1867 octave_idx_type k, octave_idx_type p, |
1868 octave_idx_type &info, | 1868 octave_idx_type &info, |
1869 ComplexMatrix &eig_vec, | 1869 ComplexMatrix &eig_vec, |
2486 (*current_liboctave_error_handler) ("eigs: error %d in dneupd", info2); | 2486 (*current_liboctave_error_handler) ("eigs: error %d in dneupd", info2); |
2487 | 2487 |
2488 return ip(4); | 2488 return ip(4); |
2489 } | 2489 } |
2490 | 2490 |
2491 template <class M> | 2491 template <typename M> |
2492 octave_idx_type | 2492 octave_idx_type |
2493 EigsComplexNonSymmetricMatrix (const M& m, const std::string typ, | 2493 EigsComplexNonSymmetricMatrix (const M& m, const std::string typ, |
2494 octave_idx_type k, octave_idx_type p, | 2494 octave_idx_type k, octave_idx_type p, |
2495 octave_idx_type &info, ComplexMatrix &eig_vec, | 2495 octave_idx_type &info, ComplexMatrix &eig_vec, |
2496 ComplexColumnVector &eig_val, const M& _b, | 2496 ComplexColumnVector &eig_val, const M& _b, |
2758 (*current_liboctave_error_handler) ("eigs: error %d in zneupd", info2); | 2758 (*current_liboctave_error_handler) ("eigs: error %d in zneupd", info2); |
2759 | 2759 |
2760 return ip(4); | 2760 return ip(4); |
2761 } | 2761 } |
2762 | 2762 |
2763 template <class M> | 2763 template <typename M> |
2764 octave_idx_type | 2764 octave_idx_type |
2765 EigsComplexNonSymmetricMatrixShift (const M& m, Complex sigma, | 2765 EigsComplexNonSymmetricMatrixShift (const M& m, Complex sigma, |
2766 octave_idx_type k, octave_idx_type p, | 2766 octave_idx_type k, octave_idx_type p, |
2767 octave_idx_type &info, | 2767 octave_idx_type &info, |
2768 ComplexMatrix &eig_vec, | 2768 ComplexMatrix &eig_vec, |