Mercurial > hg > octave-lyh
diff liboctave/eigs-base.cc @ 11570:57632dea2446
attempt better backward compatibility for Array constructors
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 19 Jan 2011 17:55:56 -0500 |
parents | fd0a3ac60b0e |
children | 12df7854fa7c |
line wrap: on
line diff
--- a/liboctave/eigs-base.cc +++ b/liboctave/eigs-base.cc @@ -849,7 +849,7 @@ } else { - Array<bool> checked(n, 1, false); + Array<bool> checked (dim_vector (n, 1), false); for (octave_idx_type i = 0; i < n; i++) { octave_idx_type bidx = @@ -907,7 +907,7 @@ } } - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -923,7 +923,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -1010,7 +1010,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); eig_vec.resize (n, k); @@ -1172,7 +1172,7 @@ } else { - Array<bool> checked (n, 1, false); + Array<bool> checked (dim_vector (n, 1), false); for (octave_idx_type i = 0; i < n; i++) { octave_idx_type bidx = @@ -1192,7 +1192,7 @@ if (have_b) bmat = 'G'; - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -1208,7 +1208,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -1347,7 +1347,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); eig_vec.resize (n, k); @@ -1501,7 +1501,7 @@ mode = 3; } - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -1517,7 +1517,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -1605,7 +1605,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); eig_vec.resize (n, k); @@ -1763,7 +1763,7 @@ } else { - Array<bool> checked (n, 1, false); + Array<bool> checked (dim_vector (n, 1), false); for (octave_idx_type i = 0; i < n; i++) { octave_idx_type bidx = @@ -1821,7 +1821,7 @@ } } - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -1837,7 +1837,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -1924,7 +1924,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); Matrix eig_vec2 (n, k + 1); @@ -2128,7 +2128,7 @@ } else { - Array<bool> checked (n, 1, false); + Array<bool> checked (dim_vector (n, 1), false); for (octave_idx_type i = 0; i < n; i++) { octave_idx_type bidx = @@ -2148,7 +2148,7 @@ if (have_b) bmat = 'G'; - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -2164,7 +2164,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -2303,7 +2303,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); Matrix eig_vec2 (n, k + 1); @@ -2505,7 +2505,7 @@ mode = 3; } - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -2521,7 +2521,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -2608,7 +2608,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); Matrix eig_vec2 (n, k + 1); @@ -2810,7 +2810,7 @@ } else { - Array<bool> checked (n, 1, false); + Array<bool> checked (dim_vector (n, 1), false); for (octave_idx_type i = 0; i < n; i++) { octave_idx_type bidx = @@ -2868,7 +2868,7 @@ } } - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -2884,7 +2884,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -2971,7 +2971,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); eig_vec.resize (n, k); @@ -3134,7 +3134,7 @@ } else { - Array<bool> checked (n, 1, false); + Array<bool> checked (dim_vector (n, 1), false); for (octave_idx_type i = 0; i < n; i++) { octave_idx_type bidx = @@ -3154,7 +3154,7 @@ if (have_b) bmat = 'G'; - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -3170,7 +3170,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -3311,7 +3311,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); eig_vec.resize (n, k); @@ -3471,7 +3471,7 @@ mode = 3; } - Array<octave_idx_type> ip (11, 1); + Array<octave_idx_type> ip (dim_vector (11, 1)); octave_idx_type *iparam = ip.fortran_vec (); ip(0) = 1; //ishift @@ -3487,7 +3487,7 @@ ip(10) = 0; // ip(7) to ip(10) return values - Array<octave_idx_type> iptr (14, 1); + Array<octave_idx_type> iptr (dim_vector (14, 1)); octave_idx_type *ipntr = iptr.fortran_vec (); octave_idx_type ido = 0; @@ -3575,7 +3575,7 @@ // long as the HOWMNY arg is not "S", the logical array // is just workspace for ARPACK, so use int type to // avoid problems. - Array<octave_idx_type> s (p, 1); + Array<octave_idx_type> s (dim_vector (p, 1)); octave_idx_type *sel = s.fortran_vec (); eig_vec.resize (n, k);