23 #if defined (HAVE_CONFIG_H) 48 #if defined (HAVE_ARPACK) 53 (*current_liboctave_warning_with_id_handler)
54 (
"Octave:convergence",
55 "eigs: 'A - sigma*B' is singular, indicating sigma is exactly " 56 "an eigenvalue so convergence is not guaranteed");
59 template <
typename M,
typename SM>
69 m = L.solve (ltyp, m,
err,
rcond,
nullptr);
73 m = U.solve (utyp, m,
err,
rcond,
nullptr);
78 template <
typename SM,
typename M>
89 const double *qv =
Q.fortran_vec ();
93 retval.elem (
i,j) = m.elem (static_cast<octave_idx_type>(qv[
i]), j);
98 template <
typename SM,
typename M>
110 const double *qv =
Q.fortran_vec ();
118 retval.elem (static_cast<octave_idx_type>(qv[
i]), j) =
147 F77_XFCN (dgemv, DGEMV, (F77_CONST_CHAR_ARG2 (
"N", 1),
148 nr, nc, 1.0, m.
data (), nr,
150 F77_CHAR_ARG_LEN (1)));
177 F77_XFCN (zgemv, ZGEMV, (F77_CONST_CHAR_ARG2 (
"N", 1),
182 F77_CHAR_ARG_LEN (1)));
219 permB = fact.
perm () - 1.0;
257 permB = fact.
perm () - 1.0;
268 bool have_b = !
b.isempty ();
291 AminusSigmaB -= sigma *
tmp *
292 b.transpose () *
b *
tmp.transpose ();
295 AminusSigmaB -= sigma *
b.transpose () *
b;
298 AminusSigmaB -= sigma *
b;
305 sigmat.
xcidx (0) = 0;
313 AminusSigmaB -= sigmat;
350 double rcond = (minU / maxU);
351 volatile double rcond_plus_one =
rcond + 1.0;
365 bool have_b = !
b.isempty ();
386 *
p++ -=
tmp.xelem (static_cast<octave_idx_type>(pB[
i]),
387 static_cast<octave_idx_type>(pB[j]));
393 AminusSigmaB -= sigma *
b;
429 double rcond = (minU / maxU);
430 volatile double rcond_plus_one =
rcond + 1.0;
444 bool have_b = !
b.isempty ();
467 AminusSigmaB -=
tmp *
b.hermitian () *
b *
468 tmp.transpose () * sigma;
471 AminusSigmaB -= sigma *
b.hermitian () *
b;
474 AminusSigmaB -= sigma *
b;
481 sigmat.
xcidx (0) = 0;
489 AminusSigmaB -= sigmat;
527 double rcond = (minU / maxU);
528 volatile double rcond_plus_one =
rcond + 1.0;
542 bool have_b = !
b.isempty ();
563 *
p++ -=
tmp.xelem (static_cast<octave_idx_type>(pB[
i]),
564 static_cast<octave_idx_type>(pB[j]));
570 AminusSigmaB -= sigma *
b;
606 double rcond = (minU / maxU);
607 volatile double rcond_plus_one =
rcond + 1.0;
615 template <
typename M>
622 std::ostream&
os,
double tol,
bool rvec,
623 bool cholB,
int disp,
int maxit)
625 F77_INT k = octave::to_f77_int (k_arg);
626 F77_INT p = octave::to_f77_int (p_arg);
628 F77_INT n = octave::to_f77_int (m.cols ());
630 bool have_b = !
b.isempty ();
636 if (m.rows () != m.cols ())
638 if (have_b && (m.rows () !=
b.rows () || m.rows () !=
b.cols ()))
639 (*current_liboctave_error_handler)
640 (
"eigs: B must be square and the same size as A");
649 else if (m.cols () != resid.
numel ())
653 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
666 if (k < 1 || k > n - 2)
667 (*current_liboctave_error_handler)
668 (
"eigs: Invalid number of eigenvalues to extract" 669 " (must be 0 < k < n-1-1).\n" 670 " Use 'eig (full (A))' instead");
673 (*current_liboctave_error_handler)
674 (
"eigs: opts.p must be greater than k and less than or equal to n");
676 if (have_b && cholB && ! permB.
isempty ())
679 if (permB.
numel () != n)
687 if (checked(bidx) || bidx < 0 || bidx >= n
693 if (typ !=
"LM" && typ !=
"SM" && typ !=
"LA" && typ !=
"SA" 694 && typ !=
"BE" && typ !=
"LR" && typ !=
"SR" && typ !=
"LI" 696 (*current_liboctave_error_handler) (
"eigs: unrecognized sigma value");
698 if (typ ==
"LI" || typ ==
"SI" || typ ==
"LR" || typ ==
"SR")
699 (*current_liboctave_error_handler)
700 (
"eigs: invalid sigma value for real symmetric problem");
720 (*current_liboctave_error_handler)
721 (
"eigs: The matrix B is not positive definite");
755 F77_INT tmp_info = octave::to_f77_int (info);
758 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
759 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
760 k, tol, presid,
p, v, n, iparam,
761 ipntr, workd, workl, lwork, tmp_info
762 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
770 os <<
"Iteration " << iter - 1 <<
771 ": a few Ritz values of the " <<
p <<
"-by-" <<
776 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
782 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
795 if (ido == -1 || ido == 1 || ido == 2)
801 mtmp(
i,0) = workd[
i + iptr(0) - 1];
806 workd[
i+iptr(1)-1] = mtmp(
i,0);
809 workd + iptr(1) - 1))
815 (*current_liboctave_error_handler)
816 (
"eigs: error %d in dsaupd", info);
842 (rvec, F77_CONST_CHAR_ARG2 (
"A", 1), sel,
d, z, n, sigma,
843 F77_CONST_CHAR_ARG2 (&bmat, 1), n,
844 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
k, tol, presid,
p, v, n, iparam,
845 ipntr, workd, workl, lwork, info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1)
846 F77_CHAR_ARG_LEN(2));
853 if (typ !=
"SM" && typ !=
"BE" && ! (typ ==
"SA" && rvec))
858 d[
i] =
d[ip(4) -
i - 1];
859 d[ip(4) -
i - 1] = dtmp;
868 for (
F77_INT j = 0; j < n; j++)
871 if (typ !=
"SM" && typ !=
"BE" && typ !=
"SA")
883 for (
F77_INT j = 0; j < n; j++)
884 dtmp[j] = z[off1 + j];
886 for (
F77_INT j = 0; j < n; j++)
887 z[off1 + j] = z[off2 + j];
889 for (
F77_INT j = 0; j < n; j++)
890 z[off2 + j] = dtmp[j];
895 eig_vec =
utsolve (bt, permB, eig_vec);
904 template <
typename M>
911 std::ostream&
os,
double tol,
bool rvec,
912 bool cholB,
int disp,
int maxit)
914 F77_INT k = octave::to_f77_int (k_arg);
915 F77_INT p = octave::to_f77_int (p_arg);
917 F77_INT n = octave::to_f77_int (m.cols ());
919 bool have_b = !
b.isempty ();
922 if (m.rows () != m.cols ())
924 if (have_b && (m.rows () !=
b.rows () || m.rows () !=
b.cols ()))
925 (*current_liboctave_error_handler)
926 (
"eigs: B must be square and the same size as A");
941 else if (m.cols () != resid.
numel ())
945 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
947 if (k <= 0 || k >= n - 1)
948 (*current_liboctave_error_handler)
949 (
"eigs: Invalid number of eigenvalues to extract" 950 " (must be 0 < k < n-1-1).\n" 951 " Use 'eig (full (A))' instead");
965 (*current_liboctave_error_handler)
966 (
"eigs: opts.p must be greater than k and less than or equal to n");
968 if (have_b && cholB && ! permB.
isempty ())
971 if (permB.
numel () != n)
979 if (checked(bidx) || bidx < 0 || bidx >= n
1028 F77_INT tmp_info = octave::to_f77_int (info);
1031 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1032 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
1033 k, tol, presid,
p, v, n, iparam,
1034 ipntr, workd, workl, lwork, tmp_info
1035 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
1042 os <<
"Iteration " << iter - 1 <<
1043 ": a few Ritz values of the " <<
p <<
"-by-" <<
1048 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1054 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1067 if (ido == -1 || ido == 1 || ido == 2)
1080 tmp(
i,0) = dtmp[P[
i]] / r(P[
i]);
1084 double *ip2 = workd+iptr(1)-1;
1092 double *ip2 = workd+iptr(2)-1;
1096 tmp(
i,0) = ip2[P[
i]] / r(P[
i]);
1100 ip2 = workd+iptr(1)-1;
1108 double *ip2 = workd+iptr(0)-1;
1112 tmp(
i,0) = ip2[P[
i]] / r(P[
i]);
1116 ip2 = workd+iptr(1)-1;
1124 (*current_liboctave_error_handler)
1125 (
"eigs: error %d in dsaupd", info);
1151 (rvec, F77_CONST_CHAR_ARG2 (
"A", 1), sel,
d, z, n, sigma,
1152 F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1153 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
1154 k, tol, presid,
p, v, n, iparam, ipntr, workd, workl, lwork, info2
1155 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
1165 d[
i] =
d[ip(4) -
i - 1];
1166 d[ip(4) -
i - 1] = dtmp;
1176 for (
F77_INT j = 0; j < n; j++)
1182 F77_INT off2 = (ip(4) -
i - 1) * n;
1187 for (
F77_INT j = 0; j < n; j++)
1188 dtmp[j] = z[off1 + j];
1190 for (
F77_INT j = 0; j < n; j++)
1191 z[off1 + j] = z[off2 + j];
1193 for (
F77_INT j = 0; j < n; j++)
1194 z[off2 + j] = dtmp[j];
1210 std::ostream&
os,
double tol,
bool rvec,
1211 bool ,
int disp,
int maxit)
1213 F77_INT n = octave::to_f77_int (n_arg);
1214 F77_INT k = octave::to_f77_int (k_arg);
1215 F77_INT p = octave::to_f77_int (p_arg);
1217 bool have_sigma = (sigma ? true :
false);
1229 else if (n != resid.
numel ())
1233 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
1246 if (k <= 0 || k >= n - 1)
1247 (*current_liboctave_error_handler)
1248 (
"eigs: Invalid number of eigenvalues to extract" 1249 " (must be 0 < k < n-1).\n" 1250 " Use 'eig (full (A))' instead");
1252 if (p <= k || p > n)
1253 (*current_liboctave_error_handler)
1254 (
"eigs: opts.p must be greater than k and less than or equal to n");
1258 if (typ !=
"LM" && typ !=
"SM" && typ !=
"LA" && typ !=
"SA" 1259 && typ !=
"BE" && typ !=
"LR" && typ !=
"SR" && typ !=
"LI" 1261 (*current_liboctave_error_handler) (
"eigs: unrecognized sigma value");
1263 if (typ ==
"LI" || typ ==
"SI" || typ ==
"LR" || typ ==
"SR")
1264 (*current_liboctave_error_handler)
1265 (
"eigs: invalid sigma value for real symmetric problem");
1312 F77_INT tmp_info = octave::to_f77_int (info);
1315 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1316 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
1317 k, tol, presid,
p, v, n, iparam,
1318 ipntr, workd, workl, lwork, tmp_info
1319 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
1327 os <<
"Iteration " << iter - 1 <<
1328 ": a few Ritz values of the " <<
p <<
"-by-" <<
1333 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1339 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1352 if (ido == -1 || ido == 1 || ido == 2)
1354 double *ip2 = workd + iptr(0) - 1;
1365 ip2 = workd + iptr(1) - 1;
1372 (*current_liboctave_error_handler)
1373 (
"eigs: error %d in dsaupd", info);
1399 (rvec, F77_CONST_CHAR_ARG2 (
"A", 1), sel,
d, z, n, sigma,
1400 F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1401 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
1402 k, tol, presid,
p, v, n, iparam, ipntr, workd, workl, lwork, info2
1403 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
1410 if (typ !=
"SM" && typ !=
"BE")
1415 d[
i] =
d[ip(4) -
i - 1];
1416 d[ip(4) -
i - 1] = dtmp;
1425 for (
F77_INT j = 0; j < n; j++)
1428 if (typ !=
"SM" && typ !=
"BE")
1435 F77_INT off2 = (ip(4) -
i - 1) * n;
1440 for (
F77_INT j = 0; j < n; j++)
1441 dtmp[j] = z[off1 + j];
1443 for (
F77_INT j = 0; j < n; j++)
1444 z[off1 + j] = z[off2 + j];
1446 for (
F77_INT j = 0; j < n; j++)
1447 z[off2 + j] = dtmp[j];
1458 template <
typename M>
1465 std::ostream&
os,
double tol,
bool rvec,
1466 bool cholB,
int disp,
int maxit)
1468 F77_INT k = octave::to_f77_int (k_arg);
1469 F77_INT p = octave::to_f77_int (p_arg);
1471 F77_INT n = octave::to_f77_int (m.cols ());
1473 bool have_b = !
b.isempty ();
1480 if (m.rows () != m.cols ())
1482 if (have_b && (m.rows () !=
b.rows () || m.rows () !=
b.cols ()))
1483 (*current_liboctave_error_handler)
1484 (
"eigs: B must be square and the same size as A");
1493 else if (m.cols () != resid.
numel ())
1497 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
1510 if (k <= 0 || k >= n - 1)
1511 (*current_liboctave_error_handler)
1512 (
"eigs: Invalid number of eigenvalues to extract" 1513 " (must be 0 < k < n-1).\n" 1514 " Use 'eig (full (A))' instead");
1516 if (p <= k || p > n)
1517 (*current_liboctave_error_handler)
1518 (
"eigs: opts.p must be greater than k and less than or equal to n");
1520 if (have_b && cholB && ! permB.
isempty ())
1523 if (permB.
numel () != n)
1531 if (checked(bidx) || bidx < 0 || bidx >= n
1537 if (typ !=
"LM" && typ !=
"SM" && typ !=
"LA" && typ !=
"SA" 1538 && typ !=
"BE" && typ !=
"LR" && typ !=
"SR" && typ !=
"LI" 1540 (*current_liboctave_error_handler) (
"eigs: unrecognized sigma value");
1542 if (typ ==
"LA" || typ ==
"SA" || typ ==
"BE")
1543 (*current_liboctave_error_handler)
1544 (
"eigs: invalid sigma value for unsymmetric problem");
1564 (*current_liboctave_error_handler)
1565 (
"eigs: The matrix B is not positive definite");
1599 F77_INT tmp_info = octave::to_f77_int (info);
1604 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1605 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
1606 k, tol, presid,
p, v, n, iparam,
1607 ipntr, workd, workl, lwork, tmp_info
1608 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
1617 os <<
"Iteration " << iter - 1 <<
1618 ": a few Ritz values of the " <<
p <<
"-by-" <<
1622 os <<
" " << workl[iptr(5)+
k] <<
"\n";
1624 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1630 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1643 if (ido == -1 || ido == 1 || ido == 2)
1649 mtmp(
i,0) = workd[
i + iptr(0) - 1];
1654 workd[
i+iptr(1)-1] = mtmp(
i,0);
1657 workd + iptr(1) - 1))
1663 (*current_liboctave_error_handler)
1664 (
"eigs: error %d in dnaupd", info);
1690 Matrix eig_vec2 (n,
k + 1, 0.0);
1701 (rvec, F77_CONST_CHAR_ARG2 (
"A", 1), sel, dr, di, z, n, sigmar,
1702 sigmai, workev, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1703 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
k, tol, presid,
p, v, n, iparam,
1704 ipntr, workd, workl, lwork, info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1)
1705 F77_CHAR_ARG_LEN(2));
1709 if (! rvec && ip(4) >
k)
1717 bool have_cplx_eig =
false;
1724 have_cplx_eig =
true;
1746 d[
i] =
d[ip(4) -
i - 1];
1747 d[ip(4) -
i - 1] = dtmp;
1761 for (
F77_INT j = 0; j < n; j++)
1768 for (
F77_INT j = 0; j < n; j++)
1771 Complex (z[j+off1],z[j+off2]);
1774 Complex (z[j+off1],-z[j+off2]);
1781 for (
F77_INT ii = ip(4); ii <
k; ii++)
1782 for (
F77_INT jj = 0; jj < n; jj++)
1789 for (
F77_INT ii = ip(4); ii <
k; ii++)
1790 for (
F77_INT jj = 0; jj < n; jj++)
1795 eig_vec =
utsolve (bt, permB, eig_vec);
1809 template <
typename M>
1817 std::ostream&
os,
double tol,
bool rvec,
1818 bool cholB,
int disp,
int maxit)
1820 F77_INT k = octave::to_f77_int (k_arg);
1821 F77_INT p = octave::to_f77_int (p_arg);
1823 F77_INT n = octave::to_f77_int (m.cols ());
1825 bool have_b = !
b.isempty ();
1829 if (m.rows () != m.cols ())
1831 if (have_b && (m.rows () !=
b.rows () || m.rows () !=
b.cols ()))
1832 (*current_liboctave_error_handler)
1833 (
"eigs: B must be square and the same size as A");
1848 else if (m.cols () != resid.
numel ())
1852 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
1865 if (k <= 0 || k >= n - 1)
1866 (*current_liboctave_error_handler)
1867 (
"eigs: Invalid number of eigenvalues to extract" 1868 " (must be 0 < k < n-1).\n" 1869 " Use 'eig (full (A))' instead");
1871 if (p <= k || p > n)
1872 (*current_liboctave_error_handler)
1873 (
"eigs: opts.p must be greater than k and less than or equal to n");
1875 if (have_b && cholB && ! permB.
isempty ())
1878 if (permB.
numel () != n)
1886 if (checked(bidx) || bidx < 0 || bidx >= n
1935 F77_INT tmp_info = octave::to_f77_int (info);
1940 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
1941 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
1942 k, tol, presid,
p, v, n, iparam,
1943 ipntr, workd, workl, lwork, tmp_info
1944 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
1953 os <<
"Iteration " << iter - 1 <<
1954 ": a few Ritz values of the " <<
p <<
"-by-" <<
1958 os <<
" " << workl[iptr(5)+
k] <<
"\n";
1960 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1966 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
1979 if (ido == -1 || ido == 1 || ido == 2)
1992 tmp(
i,0) = dtmp[P[
i]] / r(P[
i]);
1996 double *ip2 = workd+iptr(1)-1;
2004 double *ip2 = workd+iptr(2)-1;
2008 tmp(
i,0) = ip2[P[
i]] / r(P[
i]);
2012 ip2 = workd+iptr(1)-1;
2020 double *ip2 = workd+iptr(0)-1;
2024 tmp(
i,0) = ip2[P[
i]] / r(P[
i]);
2028 ip2 = workd+iptr(1)-1;
2036 (*current_liboctave_error_handler)
2037 (
"eigs: error %d in dnaupd", info);
2063 Matrix eig_vec2 (n,
k + 1, 0.0);
2074 (rvec, F77_CONST_CHAR_ARG2 (
"A", 1), sel, dr, di, z, n, sigmar,
2075 sigmai, workev, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
2076 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
k, tol, presid,
p, v, n, iparam,
2077 ipntr, workd, workl, lwork, info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1)
2078 F77_CHAR_ARG_LEN(2));
2082 if (! rvec && ip(4) >
k)
2090 bool have_cplx_eig =
false;
2097 have_cplx_eig =
true;
2120 d[
i] =
d[ip(4) -
i - 1];
2121 d[ip(4) -
i - 1] = dtmp;
2135 for (
F77_INT j = 0; j < n; j++)
2142 for (
F77_INT j = 0; j < n; j++)
2145 Complex (z[j+off1],z[j+off2]);
2148 Complex (z[j+off1],-z[j+off2]);
2155 for (
F77_INT ii = ip(4); ii <
k; ii++)
2156 for (
F77_INT jj = 0; jj < n; jj++)
2163 for (
F77_INT ii = ip(4); ii <
k; ii++)
2164 for (
F77_INT jj = 0; jj < n; jj++)
2187 std::ostream&
os,
double tol,
bool rvec,
2188 bool ,
int disp,
int maxit)
2190 F77_INT n = octave::to_f77_int (n_arg);
2191 F77_INT k = octave::to_f77_int (k_arg);
2192 F77_INT p = octave::to_f77_int (p_arg);
2194 bool have_sigma = (sigmar ? true :
false);
2207 else if (n != resid.
numel ())
2211 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
2224 if (k <= 0 || k >= n - 1)
2225 (*current_liboctave_error_handler)
2226 (
"eigs: Invalid number of eigenvalues to extract" 2227 " (must be 0 < k < n-1).\n" 2228 " Use 'eig (full (A))' instead");
2230 if (p <= k || p > n)
2231 (*current_liboctave_error_handler)
2232 (
"eigs: opts.p must be greater than k and less than or equal to n");
2236 if (typ !=
"LM" && typ !=
"SM" && typ !=
"LA" && typ !=
"SA" 2237 && typ !=
"BE" && typ !=
"LR" && typ !=
"SR" && typ !=
"LI" 2239 (*current_liboctave_error_handler) (
"eigs: unrecognized sigma value");
2241 if (typ ==
"LA" || typ ==
"SA" || typ ==
"BE")
2242 (*current_liboctave_error_handler)
2243 (
"eigs: invalid sigma value for unsymmetric problem");
2290 F77_INT tmp_info = octave::to_f77_int (info);
2295 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
2296 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
2297 k, tol, presid,
p, v, n, iparam,
2298 ipntr, workd, workl, lwork, tmp_info
2299 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
2308 os <<
"Iteration " << iter - 1 <<
2309 ": a few Ritz values of the " <<
p <<
"-by-" <<
2313 os <<
" " << workl[iptr(5)+
k] <<
"\n";
2315 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
2321 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
2334 if (ido == -1 || ido == 1 || ido == 2)
2336 double *ip2 = workd + iptr(0) - 1;
2347 ip2 = workd + iptr(1) - 1;
2354 (*current_liboctave_error_handler)
2355 (
"eigs: error %d in dnaupd", info);
2381 Matrix eig_vec2 (n,
k + 1, 0.0);
2392 (rvec, F77_CONST_CHAR_ARG2 (
"A", 1), sel, dr, di, z, n, sigmar,
2393 sigmai, workev, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
2394 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
k, tol, presid,
p, v, n, iparam,
2395 ipntr, workd, workl, lwork, info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1)
2396 F77_CHAR_ARG_LEN(2));
2400 if (! rvec && ip(4) >
k)
2408 bool have_cplx_eig =
false;
2415 have_cplx_eig =
true;
2439 d[
i] =
d[ip(4) -
i - 1];
2440 d[ip(4) -
i - 1] = dtmp;
2454 for (
F77_INT j = 0; j < n; j++)
2461 for (
F77_INT j = 0; j < n; j++)
2464 Complex (z[j+off1],z[j+off2]);
2467 Complex (z[j+off1],-z[j+off2]);
2474 for (
F77_INT ii = ip(4); ii <
k; ii++)
2475 for (
F77_INT jj = 0; jj < n; jj++)
2482 for (
F77_INT ii = ip(4); ii <
k; ii++)
2483 for (
F77_INT jj = 0; jj < n; jj++)
2500 template <
typename M>
2508 std::ostream&
os,
double tol,
bool rvec,
2509 bool cholB,
int disp,
int maxit)
2511 F77_INT k = octave::to_f77_int (k_arg);
2512 F77_INT p = octave::to_f77_int (p_arg);
2514 F77_INT n = octave::to_f77_int (m.cols ());
2516 bool have_b = !
b.isempty ();
2522 if (m.rows () != m.cols ())
2524 if (have_b && (m.rows () !=
b.rows () || m.rows () !=
b.cols ()))
2525 (*current_liboctave_error_handler)
2526 (
"eigs: B must be square and the same size as A");
2539 else if (m.cols () != cresid.
numel ())
2543 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
2556 if (k <= 0 || k >= n - 1)
2557 (*current_liboctave_error_handler)
2558 (
"eigs: Invalid number of eigenvalues to extract" 2559 " (must be 0 < k < n-1).\n" 2560 " Use 'eig (full (A))' instead");
2562 if (p <= k || p > n)
2563 (*current_liboctave_error_handler)
2564 (
"eigs: opts.p must be greater than k and less than or equal to n");
2566 if (have_b && cholB && ! permB.
isempty ())
2569 if (permB.
numel () != n)
2577 if (checked(bidx) || bidx < 0 || bidx >= n
2583 if (typ !=
"LM" && typ !=
"SM" && typ !=
"LA" && typ !=
"SA" 2584 && typ !=
"BE" && typ !=
"LR" && typ !=
"SR" && typ !=
"LI" 2586 (*current_liboctave_error_handler) (
"eigs: unrecognized sigma value");
2588 if (typ ==
"LA" || typ ==
"SA" || typ ==
"BE")
2589 (*current_liboctave_error_handler)
2590 (
"eigs: invalid sigma value for complex problem");
2610 (*current_liboctave_error_handler)
2611 (
"eigs: The matrix B is not positive definite");
2646 F77_INT tmp_info = octave::to_f77_int (info);
2649 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
2650 F77_CONST_CHAR_ARG2 (typ.c_str (), 2),
2654 tmp_info F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
2662 os <<
"Iteration " << iter - 1 <<
2663 ": a few Ritz values of the " <<
p <<
"-by-" <<
2668 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
2674 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
2687 if (ido == -1 || ido == 1 || ido == 2)
2693 mtmp(
i,0) = workd[
i + iptr(0) - 1];
2696 workd[
i+iptr(1)-1] = mtmp(
i,0);
2700 workd + iptr(1) - 1))
2706 (*current_liboctave_error_handler)
2707 (
"eigs: error %d in znaupd", info);
2738 F77_CONST_CHAR_ARG2 (&bmat, 1), n,
2739 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
2743 info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
2755 d[
i] =
d[ip(4) -
i - 1];
2756 d[ip(4) -
i - 1] = ctmp;
2767 for (
F77_INT j = 0; j < n; j++)
2775 F77_INT off2 = (ip(4) -
i - 1) * n;
2780 for (
F77_INT j = 0; j < n; j++)
2781 ctmp[j] = z[off1 + j];
2783 for (
F77_INT j = 0; j < n; j++)
2784 z[off1 + j] = z[off2 + j];
2786 for (
F77_INT j = 0; j < n; j++)
2787 z[off2 + j] = ctmp[j];
2791 eig_vec =
utsolve (bt, permB, eig_vec);
2800 template <
typename M>
2809 std::ostream&
os,
double tol,
bool rvec,
2810 bool cholB,
int disp,
int maxit)
2812 F77_INT k = octave::to_f77_int (k_arg);
2813 F77_INT p = octave::to_f77_int (p_arg);
2815 F77_INT n = octave::to_f77_int (m.cols ());
2817 bool have_b = !
b.isempty ();
2820 if (m.rows () != m.cols ())
2822 if (have_b && (m.rows () !=
b.rows () || m.rows () !=
b.cols ()))
2823 (*current_liboctave_error_handler)
2824 (
"eigs: B must be square and the same size as A");
2843 else if (m.cols () != cresid.
numel ())
2847 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
2860 if (k <= 0 || k >= n - 1)
2861 (*current_liboctave_error_handler)
2862 (
"eigs: Invalid number of eigenvalues to extract" 2863 " (must be 0 < k < n-1).\n" 2864 " Use 'eig (full (A))' instead");
2866 if (p <= k || p > n)
2867 (*current_liboctave_error_handler)
2868 (
"eigs: opts.p must be greater than k and less than or equal to n");
2870 if (have_b && cholB && ! permB.
isempty ())
2873 if (permB.
numel () != n)
2881 if (checked(bidx) || bidx < 0 || bidx >= n
2931 F77_INT tmp_info = octave::to_f77_int (info);
2934 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
2935 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
2939 tmp_info F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
2947 os <<
"Iteration " << iter - 1 <<
2948 ": a few Ritz values of the " <<
p <<
"-by-" <<
2953 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
2959 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
2972 if (ido == -1 || ido == 1 || ido == 2)
2985 tmp(
i,0) = ctmp[P[
i]] / r(P[
i]);
2989 Complex *ip2 = workd+iptr(1)-1;
2997 Complex *ip2 = workd+iptr(2)-1;
3001 tmp(
i,0) = ip2[P[
i]] / r(P[
i]);
3005 ip2 = workd+iptr(1)-1;
3013 Complex *ip2 = workd+iptr(0)-1;
3017 tmp(
i,0) = ip2[P[
i]] / r(P[
i]);
3021 ip2 = workd+iptr(1)-1;
3029 (*current_liboctave_error_handler)
3030 (
"eigs: error %d in znaupd", info);
3061 F77_CONST_CHAR_ARG2 (&bmat, 1), n,
3062 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
3066 info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
3078 d[
i] =
d[ip(4) -
i - 1];
3079 d[ip(4) -
i - 1] = ctmp;
3090 for (
F77_INT j = 0; j < n; j++)
3098 F77_INT off2 = (ip(4) -
i - 1) * n;
3103 for (
F77_INT j = 0; j < n; j++)
3104 ctmp[j] = z[off1 + j];
3106 for (
F77_INT j = 0; j < n; j++)
3107 z[off1 + j] = z[off2 + j];
3109 for (
F77_INT j = 0; j < n; j++)
3110 z[off2 + j] = ctmp[j];
3116 (
"eigs: error %d in zneupd", info2);
3128 double tol,
bool rvec,
bool ,
3129 int disp,
int maxit)
3131 F77_INT n = octave::to_f77_int (n_arg);
3132 F77_INT k = octave::to_f77_int (k_arg);
3133 F77_INT p = octave::to_f77_int (p_arg);
3135 bool have_sigma = (
std::abs (sigma) ? true :
false);
3151 else if (n != cresid.
numel ())
3155 (*current_liboctave_error_handler) (
"eigs: n must be at least 3");
3168 if (k <= 0 || k >= n - 1)
3169 (*current_liboctave_error_handler)
3170 (
"eigs: Invalid number of eigenvalues to extract" 3171 " (must be 0 < k < n-1).\n" 3172 " Use 'eig (full (A))' instead");
3174 if (p <= k || p > n)
3175 (*current_liboctave_error_handler)
3176 (
"eigs: opts.p must be greater than k and less than or equal to n");
3180 if (typ !=
"LM" && typ !=
"SM" && typ !=
"LA" && typ !=
"SA" 3181 && typ !=
"BE" && typ !=
"LR" && typ !=
"SR" && typ !=
"LI" 3183 (*current_liboctave_error_handler) (
"eigs: unrecognized sigma value");
3185 if (typ ==
"LA" || typ ==
"SA" || typ ==
"BE")
3186 (*current_liboctave_error_handler)
3187 (
"eigs: invalid sigma value for complex problem");
3235 F77_INT tmp_info = octave::to_f77_int (info);
3238 (ido, F77_CONST_CHAR_ARG2 (&bmat, 1), n,
3239 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
3243 tmp_info F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
3251 os <<
"Iteration " << iter - 1 <<
3252 ": a few Ritz values of the " <<
p <<
"-by-" <<
3257 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
3263 os <<
" " << workl[iptr(5)+
i-1] <<
"\n";
3276 if (ido == -1 || ido == 1 || ido == 2)
3278 Complex *ip2 = workd + iptr(0) - 1;
3289 ip2 = workd + iptr(1) - 1;
3296 (*current_liboctave_error_handler)
3297 (
"eigs: error %d in znaupd", info);
3328 F77_CONST_CHAR_ARG2 (&bmat, 1), n,
3329 F77_CONST_CHAR_ARG2 ((typ.c_str ()), 2),
3333 info2 F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(1) F77_CHAR_ARG_LEN(2));
3345 d[
i] =
d[ip(4) -
i - 1];
3346 d[ip(4) -
i - 1] = ctmp;
3357 for (
F77_INT j = 0; j < n; j++)
3365 F77_INT off2 = (ip(4) -
i - 1) * n;
3370 for (
F77_INT j = 0; j < n; j++)
3371 ctmp[j] = z[off1 + j];
3373 for (
F77_INT j = 0; j < n; j++)
3374 z[off1 + j] = z[off2 + j];
3376 for (
F77_INT j = 0; j < n; j++)
3377 z[off2 + j] = ctmp[j];
3398 bool cholB,
int disp,
int maxit);
3407 bool cholB,
int disp,
int maxit);
3416 bool cholB,
int disp,
int maxit);
3425 bool cholB,
int disp,
int maxit);
3436 bool cholB,
int disp,
int maxit);
3445 bool cholB,
int disp,
int maxit);
3454 bool cholB,
int disp,
int maxit);
3463 bool cholB,
int disp,
int maxit);
3474 bool rvec,
bool cholB,
int disp,
int maxit);
3483 bool rvec,
bool cholB,
int disp,
int maxit);
3494 double tol,
bool rvec,
bool cholB,
int disp,
int maxit);
3503 double tol,
bool rvec,
bool cholB,
int disp,
int maxit);
octave_idx_type rows(void) const
static bool make_cholb(Matrix &b, Matrix &bt, ColumnVector &permB)
void resize(octave_idx_type n, const Complex &rfv=Complex(0))
octave_idx_type EigsRealSymmetricFunc(EigsFunc fun, octave_idx_type n_arg, const std::string &_typ, double sigma, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool, int disp, int maxit)
octave_idx_type EigsRealNonSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
octave_idx_type EigsComplexNonSymmetricMatrixShift(const M &m, Complex sigma, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
void resize(octave_idx_type nr, octave_idx_type nc, double rfv=0)
const T * data(void) const
RowVector perm(void) const
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
OCTAVE_NORETURN liboctave_error_handler current_liboctave_error_handler
#define F77_DBLE_CMPLX_ARG(x)
octave_idx_type * cidx(void)
const T * fortran_vec(void) const
template octave_idx_type EigsRealNonSymmetricMatrix< Matrix >(const Matrix &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const Matrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
template octave_idx_type EigsComplexNonSymmetricMatrixShift< SparseComplexMatrix >(const SparseComplexMatrix &m, Complex sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const SparseComplexMatrix &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
static bool vector_product(const SparseMatrix &m, const double *x, double *y)
static Array< double > vector(octave_idx_type n, double a=1.0)
#define F77_XFCN(f, F, args)
static void warn_convergence(void)
template octave_idx_type EigsRealNonSymmetricMatrix< SparseMatrix >(const SparseMatrix &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const SparseMatrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
template octave_idx_type EigsComplexNonSymmetricMatrixShift< ComplexMatrix >(const ComplexMatrix &m, Complex sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const ComplexMatrix &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
template octave_idx_type EigsRealSymmetricMatrix< SparseMatrix >(const SparseMatrix &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const SparseMatrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
octave_idx_type cols(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
SparseMatrix R(void) const
template octave_idx_type EigsRealSymmetricMatrixShift< Matrix >(const Matrix &m, double sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const Matrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
octave_idx_type EigsRealNonSymmetricMatrixShift(const M &m, double sigmar, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
Matrix transpose(void) const
template octave_idx_type EigsRealNonSymmetricMatrixShift< SparseMatrix >(const SparseMatrix &m, double sigmar, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const SparseMatrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
octave_idx_type EigsRealNonSymmetricFunc(EigsFunc fun, octave_idx_type n_arg, const std::string &_typ, double sigmar, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool, int disp, int maxit)
static bool LuAminusSigmaB(const SparseMatrix &m, const SparseMatrix &b, bool cholB, const ColumnVector &permB, double sigma, SparseMatrix &L, SparseMatrix &U, octave_idx_type *P, octave_idx_type *Q, ColumnVector &r)
ComplexColumnVector(* EigsComplexFunc)(const ComplexColumnVector &x, int &eigs_error)
template octave_idx_type EigsRealNonSymmetricMatrixShift< Matrix >(const Matrix &m, double sigmar, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const Matrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
static M ltsolve(const SM &L, const ColumnVector &Q, const M &m)
octave_idx_type * ridx(void)
octave_idx_type * xridx(void)
octave_idx_type EigsRealSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
template octave_idx_type EigsComplexNonSymmetricMatrix< ComplexMatrix >(const ComplexMatrix &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const ComplexMatrix &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
F77_RET_T F77_FUNC(xerbla, XERBLA)
octave_idx_type EigsComplexNonSymmetricMatrix(const M &m, const std::string typ, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const M &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
T & xelem(octave_idx_type n)
octave_idx_type cols(void) const
F77_RET_T const F77_INT const F77_INT const F77_INT F77_DBLE const F77_INT F77_DBLE const F77_INT F77_DBLE * Q
octave_idx_type EigsRealSymmetricMatrixShift(const M &m, double sigma, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const M &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
#define F77_CONST_DBLE_CMPLX_ARG(x)
void resize(octave_idx_type nr, octave_idx_type nc, const Complex &rfv=Complex(0))
octave_f77_int_type F77_INT
static octave_idx_type lusolve(const SM &L, const SM &U, M &m)
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol NaN(Not a Number). NaN is the result of operations which do not produce a well defined 0 result. Common operations which produce a NaN are arithmetic with infinity ex($\infty - \infty$)
octave_idx_type EigsComplexNonSymmetricFunc(EigsComplexFunc fun, octave_idx_type n_arg, const std::string &_typ, Complex sigma, octave_idx_type k_arg, octave_idx_type p_arg, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool, int disp, int maxit)
F77_RET_T const F77_INT const F77_INT const F77_INT const F77_DBLE const F77_DBLE F77_INT & M
ColumnVector P_vec(void) const
the element is set to zero In other the statement xample y
static M utsolve(const SM &U, const ColumnVector &Q, const M &m)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
ColumnVector(* EigsFunc)(const ColumnVector &x, int &eigs_error)
static std::string distribution(void)
template octave_idx_type EigsComplexNonSymmetricMatrix< SparseComplexMatrix >(const SparseComplexMatrix &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, ComplexMatrix &eig_vec, ComplexColumnVector &eig_val, const SparseComplexMatrix &_b, ColumnVector &permB, ComplexColumnVector &cresid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
ColumnVector imag(const ComplexColumnVector &a)
const octave_idx_type * row_perm(void) const
OCTAVE_EXPORT octave_value_list error nd deftypefn *const octave_scalar_map err
template octave_idx_type EigsRealSymmetricMatrixShift< SparseMatrix >(const SparseMatrix &m, double sigma, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const SparseMatrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
const octave_idx_type * col_perm(void) const
std::complex< double > Complex
octave_idx_type * xcidx(void)
octave_idx_type numel(void) const
Number of elements in the array.
Vector representing the dimensions (size) of an Array.
template octave_idx_type EigsRealSymmetricMatrix< Matrix >(const Matrix &m, const std::string typ, octave_idx_type k, octave_idx_type p, octave_idx_type &info, Matrix &eig_vec, ColumnVector &eig_val, const Matrix &_b, ColumnVector &permB, ColumnVector &resid, std::ostream &os, double tol, bool rvec, bool cholB, int disp, int maxit)
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
octave_idx_type rows(void) const
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x
T chol_matrix(void) const
void resize(octave_idx_type n, const double &rfv=0)
ComplexMatrix hermitian(void) const