comparison libinterp/corefcn/__lin_interpn__.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 48b2ad5ee801
children fcac5dbbf9ed
comparison
equal deleted inserted replaced
21138:e2fca7d79169 21139:538b57866b90
32 #include "error.h" 32 #include "error.h"
33 #include "ovl.h" 33 #include "ovl.h"
34 34
35 // equivalent to isvector.m 35 // equivalent to isvector.m
36 36
37 template <class T> 37 template <typename T>
38 bool 38 bool
39 isvector (const T& array) 39 isvector (const T& array)
40 { 40 {
41 const dim_vector dv = array.dims (); 41 const dim_vector dv = array.dims ();
42 return dv.length () == 2 && (dv(0) == 1 || dv(1) == 1); 42 return dv.length () == 2 && (dv(0) == 1 || dv(1) == 1);
43 } 43 }
44 44
45 // lookup a value in a sorted table (lookup.m) 45 // lookup a value in a sorted table (lookup.m)
46 template <class T> 46 template <typename T>
47 octave_idx_type 47 octave_idx_type
48 lookup (const T *x, octave_idx_type n, T y) 48 lookup (const T *x, octave_idx_type n, T y)
49 { 49 {
50 octave_idx_type j; 50 octave_idx_type j;
51 51
120 } 120 }
121 } 121 }
122 122
123 // n-dimensional linear interpolation 123 // n-dimensional linear interpolation
124 124
125 template <class T> 125 template <typename T>
126 void 126 void
127 lin_interpn (int n, const octave_idx_type *size, const octave_idx_type *scale, 127 lin_interpn (int n, const octave_idx_type *size, const octave_idx_type *scale,
128 octave_idx_type Ni, T extrapval, const T **x, 128 octave_idx_type Ni, T extrapval, const T **x,
129 const T *v, const T **y, T *vi) 129 const T *v, const T **y, T *vi)
130 { 130 {
179 } 179 }
180 } 180 }
181 } 181 }
182 } 182 }
183 183
184 template <class T, class M> 184 template <typename T, typename M>
185 octave_value 185 octave_value
186 lin_interpn (int n, M *X, const M V, M *Y) 186 lin_interpn (int n, M *X, const M V, M *Y)
187 { 187 {
188 octave_value retval; 188 octave_value retval;
189 189