1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800
|
!%f90 -*- f90 -*-
! Signatures for f2py wrappers of FORTRAN LAPACK functions.
!
! Author: Pearu Peterson
! Created: Jan-Feb 2002
! $Revision$ $Date$
!
! Additions by Travis Oliphant
! Additions by Tiziano Zito
! Usage:
! f2py -c flapack.pyf -L/usr/local/lib/atlas -llapack -lf77blas -lcblas -latlas -lg2c
python module flapack
interface
subroutine <tchar=s,d>pbtrf(lower,n,kd,ab,ldab,info)
! Compute Cholesky decomposition of banded symmetric positive definite
! matrix:
! A = U^T * U, C = U if lower = 0
! A = L * L^T, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
callstatement (*f2py_func)((lower?"L":"U"),&n,&kd,ab,&ldab,&info);
callprotoargument char*,int*,int*,<type_in_c>*,int*,int*
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
<type_in> dimension(ldab,n),intent(in,out,copy,out=c) :: ab
integer intent(out) :: info
end subroutine <tchar=s,d>pbtrf
subroutine <tchar=c,z>pbtrf(lower,n,kd,ab,ldab,info)
! Compute Cholesky decomposition of banded symmetric positive definite
! matrix:
! A = U^H * U, C = U if lower = 0
! A = L * L^H, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
callstatement (*f2py_func)((lower?"L":"U"),&n,&kd,ab,&ldab,&info);
callprotoargument char*,int*,int*,<type_in_c>*,int*,int*
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
<type_in> dimension(ldab,n),intent(in,out,copy,out=c) :: ab
integer intent(out) :: info
end subroutine <tchar=c,z>pbtrf
subroutine <tchar=s,d>pbsv(lower,n,kd,nrhs,ab,ldab,b,ldb,info)
!
! Computes the solution to a real system of linear equations
! A * X = B,
! where A is an N-by-N symmetric positive definite band matrix and X
! and B are N-by-NRHS matrices.
!
! The Cholesky decomposition is used to factor A as
! A = U**T * U, if lower=1, or
! A = L * L**T, if lower=0
! where U is an upper triangular band matrix, and L is a lower
! triangular band matrix, with the same number of superdiagonals or
! subdiagonals as A. The factored form of A is then used to solve the
! system of equations A * X = B.
callstatement (*f2py_func)((lower?"L":"U"),&n,&kd,&nrhs,ab,&ldab,b,&ldb,&info);
callprotoargument char*,int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
integer intent(hide),depend(b) :: ldb=shape(b,1)
integer intent(hide),depend(b) :: nrhs=shape(b,0)
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
<type_in> dimension(nrhs,ldb),intent(in,out,copy,out=x) :: b
<type_in> dimension(ldab,n),intent(in,out,copy,out=c) :: ab
integer intent(out) :: info
end subroutine <tchar=s,d>pbsv
subroutine <tchar=c,z>pbsv(lower,n,kd,nrhs,ab,ldab,b,ldb,info)
!
! Computes the solution to a real system of linear equations
! A * X = B,
! where A is an N-by-N Hermitian positive definite band matrix and X
! and B are N-by-NRHS matrices.
!
! The Cholesky decomposition is used to factor A as
! A = U**H * U, if lower=1, or
! A = L * L**H, if lower=0
! where U is an upper triangular band matrix, and L is a lower
! triangular band matrix, with the same number of superdiagonals or
! subdiagonals as A. The factored form of A is then used to solve the
! system of equations A * X = B.
callstatement (*f2py_func)((lower?"L":"U"),&n,&kd,&nrhs,ab,&ldab,b,&ldb,&info);
callprotoargument char*,int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
integer intent(hide),depend(b) :: ldb=shape(b,1)
integer intent(hide),depend(b) :: nrhs=shape(b,0)
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
<type_in> dimension(nrhs,ldb),intent(in,out,copy,out=x) :: b
<type_in> dimension(ldab,n),intent(in,out,copy,out=c) :: ab
integer intent(out) :: info
end subroutine <tchar=c,z>pbsv
subroutine <tchar=s,d,c,z>gebal(scale,permute,n,a,m,lo,hi,pivscale,info)
!
! ba,lo,hi,pivscale,info = gebal(a,scale=0,permute=0,overwrite_a=0)
! Balance general matrix a.
! hi,lo are such that ba[i][j]==0 if i>j and j=0...lo-1 or i=hi+1..n-1
! pivscale([0:lo], [lo:hi+1], [hi:n+1]) = (p1,d,p2) where (p1,p2)[j] is
! the index of the row and column interchanged with row and column j.
! d[j] is the scaling factor applied to row and column j.
! The order in which the interchanges are made is n-1 to hi+1, then 0 to lo-1.
!
! P * A * P = [[T1,X,Y],[0,B,Z],[0,0,T2]]
! BA = [[T1,X*D,Y],[0,inv(D)*B*D,ind(D)*Z],[0,0,T2]]
! where D = diag(d), T1,T2 are upper triangular matrices.
! lo,hi mark the starting and ending columns of submatrix B.
callstatement { (*f2py_func)((permute?(scale?"B":"P"):(scale?"S":"N")),&n,a,&m,&lo,&hi,pivscale,&info); hi--; lo--; }
callprotoargument char*,int*,<type_in_c>*,int*,int*,int*,<rtype_in_c>*,int*
integer intent(in),optional :: permute = 0
integer intent(in),optional :: scale = 0
integer intent(hide),depend(a,n) :: m = shape(a,0)
integer intent(hide),depend(a) :: n = shape(a,1)
check(m>=n) m
integer intent(out) :: hi,lo
<rtype_in> dimension(n),intent(out),depend(n) :: pivscale
<type_in> dimension(m,n),intent(in,out,copy,out=ba) :: a
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>gebal
subroutine <tchar=s,d,c,z>gehrd(n,lo,hi,a,tau,work,lwork,info)
!
! hq,tau,info = gehrd(a,lo=0,hi=n-1,lwork=n,overwrite_a=0)
! Reduce general matrix A to upper Hessenberg form H by unitary similarity
! transform Q^H * A * Q = H
!
! Q = H(lo) * H(lo+1) * ... * H(hi-1)
! H(i) = I - tau * v * v^H
! v[0:i+1] = 0, v[i+1]=1, v[hi+1:n] = 0
! v[i+2:hi+1] is stored in hq[i+2:hi+i,i]
! tau is tau[i]
!
! hq for n=7,lo=1,hi=5:
! [a a h h h h a
! a h h h h a
! h h h h h h
! v2h h h h h
! v2v3h h h h
! v2v3v4h h h
! a]
!
callstatement { hi++; lo++; (*f2py_func)(&n,&lo,&hi,a,&n,tau,work,&lwork,&info); }
callprotoargument int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,out,copy,out=ht),check(shape(a,0)==shape(a,1)) :: a
integer intent(in),optional :: lo = 0
integer intent(in),optional,depend(n) :: hi = n-1
<type_in> dimension(n-1),intent(out),depend(n) :: tau
<type_in> dimension(lwork),intent(cahce,hide),depend(lwork) :: work
integer intent(in),optional,depend(n),check(lwork>=MAX(n,1)) :: lwork = MAX(n,1)
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>gehrd
subroutine <tchar=s,d,c,z>gbsv(n,kl,ku,nrhs,ab,piv,b,info)
!
! lub,piv,x,info = gbsv(kl,ku,ab,b,overwrite_ab=0,overwrite_b=0)
! Solve A * X = B
! A = P * L * U
! A is a band matrix of order n with kl subdiagonals and ku superdiagonals
! starting at kl-th row.
! X, B are n-by-nrhs matrices
!
callstatement {int i=2*kl+ku+1;(*f2py_func)(&n,&kl,&ku,&nrhs,ab,&i,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);}
callprotoargument int*,int*,int*,int*,<type_in_c>*,int*,int*,<type_in_c>*,int*,int*
integer depend(ab),intent(hide):: n = shape(ab,1)
integer intent(in) :: kl
integer intent(in) :: ku
integer depend(b),intent(hide) :: nrhs = shape(b,1)
<type_in> dimension(2*kl+ku+1,n),depend(kl,ku), check(2*kl+ku+1==shape(ab,0)) :: ab
integer dimension(n),depend(n),intent(out) :: piv
<type_in> dimension(n,nrhs),depend(n),check(shape(ab,1)==shape(b,0)) :: b
integer intent(out) :: info
intent(in,out,copy,out=x) b
intent(in,out,copy,out=lub) ab
end subroutine <tchar=s,d,c,z>gbsv
subroutine <tchar=s,d,c,z>gesv(n,nrhs,a,piv,b,info)
! lu,piv,x,info = gesv(a,b,overwrite_a=0,overwrite_b=0)
! Solve A * X = B.
! A = P * L * U
! U is upper diagonal triangular, L is unit lower triangular,
! piv pivots columns.
callstatement {int i;(*f2py_func)(&n,&nrhs,a,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);}
callprotoargument int*,int*,<type_in_c>*,int*,int*,<type_in_c>*,int*,int*
integer depend(a),intent(hide):: n = shape(a,0)
integer depend(b),intent(hide):: nrhs = shape(b,1)
<type_in> dimension(n,n),check(shape(a,0)==shape(a,1)) :: a
integer dimension(n),depend(n),intent(out) :: piv
<type_in> dimension(n,nrhs),check(shape(a,0)==shape(b,0)),depend(n) :: b
integer intent(out)::info
intent(in,out,copy,out=x) b
intent(in,out,copy,out=lu) a
end subroutine <tchar=s,d,c,z>gesv
subroutine <tchar=s,d,c,z>getrf(m,n,a,piv,info)
! lu,piv,info = getrf(a,overwrite_a=0)
! Compute an LU factorization of a general M-by-N matrix A.
! A = P * L * U
threadsafe
callstatement {int i;(*f2py_func)(&m,&n,a,&m,piv,&info);for(i=0,n=MIN(m,n);i<n;--piv[i++]);}
callprotoargument int*,int*,<type_in_c>*,int*,int*,int*
integer depend(a),intent(hide):: m = shape(a,0)
integer depend(a),intent(hide):: n = shape(a,1)
<type_in> dimension(m,n),intent(in,out,copy,out=lu) :: a
integer dimension(MIN(m,n)),depend(m,n),intent(out) :: piv
integer intent(out):: info
end subroutine <tchar=s,d,c,z>getrf
subroutine <tchar=s,d,c,z>getrs(n,nrhs,lu,piv,b,info,trans)
! x,info = getrs(lu,piv,b,trans=0,overwrite_b=0)
! Solve A * X = B if trans=0
! Solve A^T * X = B if trans=1
! Solve A^H * X = B if trans=2
! A = P * L * U
threadsafe
callstatement {int i;for(i=0;i<n;++piv[i++]);(*f2py_func)((trans?(trans==2?"C":"T"):"N"),&n,&nrhs,lu,&n,piv,b,&n,&info);for(i=0;i<n;--piv[i++]);}
callprotoargument char*,int*,int*,<type_in_c>*,int*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(trans>=0 && trans <=2) :: trans = 0
integer depend(lu),intent(hide):: n = shape(lu,0)
integer depend(b),intent(hide):: nrhs = shape(b,1)
<type_in> dimension(n,n),intent(in) :: lu
check(shape(lu,0)==shape(lu,1)) :: lu
integer dimension(n),intent(in),depend(n) :: piv
<type_in> dimension(n,nrhs),intent(in,out,copy,out=x),depend(n),check(shape(lu,0)==shape(b,0)) :: b
integer intent(out):: info
end subroutine <tchar=s,d,c,z>getrs
subroutine <tchar=s,d,c,z>getri(n,lu,piv,work,lwork,info)
! inv_a,info = getri(lu,piv,lwork=3*n,overwrite_lu=0)
! Find A inverse A^-1.
! A = P * L * U
callstatement {int i;for(i=0;i<n;++piv[i++]);(*f2py_func)(&n,lu,&n,piv,work,&lwork,&info);for(i=0;i<n;--piv[i++]);}
callprotoargument int*,<type_in_c>*,int*,int*,<type_in_c>*,int*,int*
integer depend(lu),intent(hide):: n = shape(lu,0)
<type_in> dimension(n,n),intent(in,out,copy,out=inv_a) :: lu
check(shape(lu,0)==shape(lu,1)) :: lu
integer dimension(n),intent(in),depend(n) :: piv
integer intent(out):: info
integer optional,intent(in),depend(n),check(lwork>=n) :: lwork=3*n
<type_in> dimension(lwork),intent(hide,cache),depend(lwork) :: work
end subroutine <tchar=s,d,c,z>getri
subroutine <tchar=s,d>gesdd(m,n,minmn,du,dvt,a,compute_uv,u,s,vt,work,lwork,iwork,info)
! u,s,vt,info = gesdd(a,compute_uv=1,lwork=..,overwrite_a=0)
! Compute the singular value decomposition (SVD):
! A = U * SIGMA * transpose(V)
! A - M x N matrix
! U - M x M matrix
! SIGMA - M x N zero matrix with a main diagonal filled with min(M,N)
! singular values
! transpose(V) - N x N matrix
callstatement (*f2py_func)((compute_uv?"A":"N"),&m,&n,a,&m,s,u,&du,vt,&dvt,work,&lwork,iwork,&info)
callprotoargument char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*,int*
integer intent(in),optional,check(compute_uv==0||compute_uv==1):: compute_uv = 1
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
integer intent(hide),depend(m,n):: minmn = MIN(m,n)
integer intent(hide),depend(compute_uv,minmn) :: du = (compute_uv?m:1)
integer intent(hide),depend(compute_uv,n) :: dvt = (compute_uv?n:1)
<type_in> dimension(m,n),intent(in,copy) :: a
<type_in> dimension(minmn),intent(out),depend(minmn) :: s
<type_in> dimension(du,du),intent(out),depend(du) :: u
<type_in> dimension(dvt,dvt),intent(out),depend(dvt) :: vt
<type_in> dimension(lwork),intent(hide,cache),depend(lwork) :: work
integer optional,intent(in),depend(minmn,compute_uv) &
:: lwork = (compute_uv?4*minmn*minmn+MAX(m,n)+9*minmn:MAX(14*minmn+4,10*minmn+2+25*(25+8))+MAX(m,n))
! gesdd docs are mess: optimal turns out to be less than minimal in docs
! check(lwork>=(compute_uv?3*minmn*minmn+MAX(MAX(m,n),4*minmn*(minmn+1)):MAX(14*minmn+4,10*minmn+2+25*(25+8))+MAX(m,n))) :: lwork
integer intent(hide,cache),dimension(8*minmn),depend(minmn) :: iwork
integer intent(out)::info
end subroutine <tchar=s,d>gesdd
subroutine <tchar=c,z>gesdd(m,n,minmn,du,dvt,a,compute_uv,u,s,vt,work,rwork,lwork,iwork,info)
! u,s,vt,info = gesdd(a,compute_uv=1,lwork=..,overwrite_a=0)
! Compute the singular value decomposition (SVD):
! A = U * SIGMA * conjugate-transpose(V)
! A - M x N matrix
! U - M x M matrix
! SIGMA - M x N zero matrix with a main diagonal filled with min(M,N)
! singular values
! conjugate-transpose(V) - N x N matrix
callstatement (*f2py_func)((compute_uv?"A":"N"),&m,&n,a,&m,s,u,&du,vt,&dvt,work,&lwork,rwork,iwork,&info)
callprotoargument char*,int*,int*,<type_in_c>*,int*,<rtype_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*,int*
integer intent(in),optional,check(compute_uv==0||compute_uv==1):: compute_uv = 1
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
integer intent(hide),depend(m,n):: minmn = MIN(m,n)
integer intent(hide),depend(compute_uv,minmn) :: du = (compute_uv?m:1)
integer intent(hide),depend(compute_uv,n) :: dvt = (compute_uv?n:1)
<type_in> dimension(m,n),intent(in,copy) :: a
<rtype_in> dimension(minmn),intent(out),depend(minmn) :: s
<type_in> dimension(du,du),intent(out),depend(du) :: u
<type_in> dimension(dvt,dvt),intent(out),depend(dvt) :: vt
<type_in> dimension(lwork),intent(hide,cache),depend(lwork) :: work
<rtype_in> dimension((compute_uv?5*minmn*minmn+7*minmn:5*minmn)),intent(hide,cache),depend(minmn,compute_uv) :: rwork
integer optional,intent(in),depend(minmn,compute_uv) &
:: lwork = (compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n))
check(lwork>=(compute_uv?2*minmn*minmn+MAX(m,n)+2*minmn:2*minmn+MAX(m,n))) :: lwork
integer intent(hide,cache),dimension(8*minmn),depend(minmn) :: iwork
integer intent(out)::info
end subroutine <tchar=c,z>gesdd
subroutine <tchar=s,d>gelss(m,n,minmn,maxmn,nrhs,a,b,s,cond,r,work,lwork,info)
! v,x,s,rank,info = gelss(a,b,cond=-1.0,overwrite_a=0,overwrite_b=0)
! Solve Minimize 2-norm(A * X - B).
callstatement (*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,&info)
callprotoargument int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
integer intent(hide),depend(m,n):: minmn = MIN(m,n)
integer intent(hide),depend(m,n):: maxmn = MAX(m,n)
<type_in> dimension(m,n),intent(in,out,copy,out=v) :: a
integer depend(b),intent(hide):: nrhs = shape(b,1)
<type_in> dimension(maxmn,nrhs),check(maxmn==shape(b,0)),depend(maxmn) :: b
intent(in,out,copy,out=x) b
integer intent(out)::info
integer optional,intent(in),depend(nrhs,minmn,maxmn), &
check(lwork>=1) &
:: lwork=3*minmn+MAX(2*minmn,MAX(maxmn,nrhs))
!check(lwork>=3*minmn+MAX(2*minmn,MAX(maxmn,nrhs)))
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
<type_in> intent(in),optional :: cond = -1.0
integer intent(out,out=rank) :: r
<type_in> intent(out),dimension(minmn),depend(minmn) :: s
end subroutine <tchar=s,d>gelss
subroutine <tchar=c,z>gelss(m,n,minmn,maxmn,nrhs,a,b,s,cond,r,work,rwork,lwork,info)
! v,x,s,rank,info = gelss(a,b,cond=-1.0,overwrite_a=0,overwrite_b=0)
! Solve Minimize 2-norm(A * X - B).
callstatement (*f2py_func)(&m,&n,&nrhs,a,&m,b,&maxmn,s,&cond,&r,work,&lwork,rwork,&info)
callprotoargument int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,<rtype_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
integer intent(hide),depend(m,n):: minmn = MIN(m,n)
integer intent(hide),depend(m,n):: maxmn = MAX(m,n)
<type_in> dimension(m,n),intent(in,out,copy,out=v) :: a
integer depend(b),intent(hide):: nrhs = shape(b,1)
<type_in> dimension(maxmn,nrhs),check(maxmn==shape(b,0)),depend(maxmn) :: b
intent(in,out,copy,out=x) b
integer intent(out)::info
integer optional,intent(in),depend(nrhs,minmn,maxmn), &
check(lwork>=1) &
:: lwork=2*minmn+MAX(maxmn,nrhs)
! check(lwork>=2*minmn+MAX(maxmn,nrhs))
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
<rtype_in> dimension(5*minmn-1),intent(hide),depend(lwork) :: rwork
<rtype_in> intent(in),optional :: cond = -1.0
integer intent(out,out=rank) :: r
<rtype_in> intent(out),dimension(minmn),depend(minmn) :: s
end subroutine <tchar=c,z>gelss
subroutine <tchar=s,d,c,z>geqrf(m,n,a,tau,work,lwork,info)
! qr_a,tau,work,info = geqrf(a,lwork=3*n,overwrite_a=0)
! Compute a QR factorization of a real M-by-N matrix A:
! A = Q * R.
callstatement (*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info)
callprotoargument int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
<type_in> dimension(m,n),intent(in,out,copy,out=qr) :: a
<type_in> dimension(MIN(m,n)),intent(out) :: tau
integer optional,intent(in),depend(n),check(lwork>=n||lwork==-1) :: lwork=3*n
<type_in> dimension(MAX(lwork,1)),intent(out),depend(lwork) :: work
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>geqrf
subroutine <tchar=s,d,c,z>gerqf(m,n,a,tau,work,lwork,info)
! rq_a,tau,work,info = gerqf(a,lwork=3*n,overwrite_a=0)
! Compute an RQ factorization of a real M-by-N matrix A:
! A = R * Q.
callstatement (*f2py_func)(&m,&n,a,&m,tau,work,&lwork,&info)
callprotoargument int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
<type_in> dimension(m,n),intent(in,out,copy,out=qr) :: a
<type_in> dimension(MIN(m,n)),intent(out) :: tau
integer optional,intent(in),depend(n),check(lwork>=n||lwork==-1) :: lwork=3*n
<type_in> dimension(MAX(lwork,1)),intent(out),depend(lwork) :: work
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>gerqf
subroutine <tchar=s,d>orgqr(m,n,k,a,tau,work,lwork,info)
! q,work,info = orgqr(a,lwork=3*n,overwrite_a=0)
! Generates an M-by-N real matrix Q with orthonormal columns,
! which is defined as the first N columns of a product of K elementary
! reflectors of order M (e.g. output of geqrf)
callstatement (*f2py_func)(&m,&n,&k,a,&m,tau,work,&lwork,&info)
callprotoargument int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
integer intent(hide),depend(tau):: k = shape(tau,0)
<type_in> dimension(m,n),intent(in,out,copy,out=q) :: a
<type_in> dimension(k),intent(in) :: tau
integer optional,intent(in),depend(n),check(lwork>=n||lwork==-1) :: lwork=3*n
<type_in> dimension(MAX(lwork,1)),intent(out),depend(lwork) :: work
integer intent(out) :: info
end subroutine <tchar=s,d>orgqr
subroutine <tchar=c,z>ungqr(m,n,k,a,tau,work,lwork,info)
! q,work,info = ungqr(a,lwork=3*n,overwrite_a=0)
! Generates an M-by-N complex matrix Q with unitary columns,
! which is defined as the first N columns of a product of K elementary
! reflectors of order M (e.g. output of geqrf)
callstatement (*f2py_func)(&m,&n,&k,a,&m,tau,work,&lwork,&info)
callprotoargument int*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*
integer intent(hide),depend(a):: m = shape(a,0)
integer intent(hide),depend(a):: n = shape(a,1)
integer intent(hide),depend(tau):: k = shape(tau,0)
<type_in> dimension(m,n),intent(in,out,copy,out=q) :: a
<type_in> dimension(k),intent(in) :: tau
integer optional,intent(in),depend(n),check(lwork>=n||lwork==-1) :: lwork=3*n
<type_in> dimension(MAX(lwork,1)),intent(out),depend(lwork) :: work
integer intent(out) :: info
end subroutine <tchar=c,z>ungqr
+
subroutine <tchar=s,d>geev(compute_vl,compute_vr,n,a,wr,wi,vl,ldvl,vr,ldvr,work,lwork,info)
! wr,wi,vl,vr,info = geev(a,compute_vl=1,compute_vr=1,lwork=4*n,overwrite_a=0)
callstatement {(*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,wr,wi,vl,&ldvl,vr,&ldvr,work,&lwork,&info);}
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,intent(in):: compute_vl = 1
check(compute_vl==1||compute_vl==0) compute_vl
integer optional,intent(in):: compute_vr = 1
check(compute_vr==1||compute_vr==0) compute_vr
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,copy) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> dimension(n),intent(out),depend(n) :: wr
<type_in> dimension(n),intent(out),depend(n) :: wi
<type_in> dimension(ldvl,n),intent(out) :: vl
integer intent(hide),depend(n,compute_vl) :: ldvl=(compute_vl?n:1)
<type_in> dimension(ldvr,n),intent(out) :: vr
integer intent(hide),depend(n,compute_vr) :: ldvr=(compute_vr?n:1)
integer optional,intent(in),depend(n,compute_vl,compute_vr) :: lwork=4*n
check(lwork>=((compute_vl||compute_vr)?4*n:3*n)) :: lwork
<type_in> dimension(lwork),intent(hide,cache),depend(lwork) :: work
integer intent(out):: info
end subroutine <tchar=s,d>geev
subroutine <tchar=c,z>geev(compute_vl,compute_vr,n,a,w,vl,ldvl,vr,ldvr,work,lwork,rwork,info)
! w,vl,vr,info = geev(a,compute_vl=1,compute_vr=1,lwork=2*n,overwrite_a=0)
callstatement (*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,w,vl,&ldvl,vr,&ldvr,work,&lwork,rwork,&info)
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*
integer optional,intent(in):: compute_vl = 1
check(compute_vl==1||compute_vl==0) compute_vl
integer optional,intent(in):: compute_vr = 1
check(compute_vr==1||compute_vr==0) compute_vr
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,copy) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> dimension(n),intent(out),depend(n) :: w
<type_in> dimension(ldvl,n),depend(ldvl),intent(out) :: vl
integer intent(hide),depend(compute_vl,n) :: ldvl=(compute_vl?n:1)
<type_in> dimension(ldvr,n),depend(ldvr),intent(out) :: vr
integer intent(hide),depend(compute_vr,n) :: ldvr=(compute_vr?n:1)
integer optional,intent(in),depend(n) :: lwork=2*n
check(lwork>=2*n) :: lwork
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
<rtype_in> dimension(2*n),intent(hide,cache),depend(n) :: rwork
integer intent(out):: info
end subroutine <tchar=c,z>geev
subroutine <tchar=s,d>gegv(compute_vl,compute_vr,n,a,b,alphar,alphai,beta,vl,ldvl,vr,ldvr,work,lwork,info)
! Compute the generalized eigenvalues (alphar +/- alphai*i, beta)
! of the real nonsymmetric matrices A and B: det(A-w*B)=0 where w=alpha/beta.
! Optionally, compute the left and/or right generalized eigenvectors:
! (A - w B) r = 0, l^H * (A - w B) = 0
!
! alphar,alphai,beta,vl,vr,info = gegv(a,b,compute_vl=1,compute_vr=1,lwork=8*n,overwrite_a=0,overwrite_b=0)
callstatement (*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,b,&n,alphar,alphai,beta,vl,&ldvl,vr,&ldvr,work,&lwork,&info)
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,intent(in):: compute_vl = 1
check(compute_vl==1||compute_vl==0) compute_vl
integer optional,intent(in):: compute_vr = 1
check(compute_vr==1||compute_vr==0) compute_vr
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,copy) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> dimension(n,n),depend(n),intent(in,copy) :: b
check(shape(b,0)==shape(b,1) && shape(b,0)==n) :: b
<type_in> dimension(n),depend(n),intent(out) :: alphar
<type_in> dimension(n),depend(n),intent(out) :: alphai
<type_in> dimension(n),depend(n),intent(out) :: beta
<type_in> dimension(ldvl,n),intent(out),depend(ldvl) :: vl
integer intent(hide),depend(compute_vl,n) :: ldvl=(compute_vl?n:1)
<type_in> dimension(ldvr,n),intent(out),depend(ldvr) :: vr
integer intent(hide),depend(compute_vr,n) :: ldvr=(compute_vr?n:1)
integer optional,intent(in),depend(n) :: lwork=8*n
check(lwork>=8*n) :: lwork
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
integer intent(out):: info
end subroutine <tchar=s,d>gegv
subroutine <tchar=c,z>gegv(compute_vl,compute_vr,n,a,b,alpha,beta,vl,ldvl,vr,ldvr,work,lwork,rwork,info)
! Compute the generalized eigenvalues (alpha, beta)
! of the comples nonsymmetric matrices A and B: det(A-w*B)=0 where w=alpha/beta.
! Optionally, compute the left and/or right generalized eigenvectors:
! (A - w B) r = 0, l^H * (A - w B) = 0
!
! alpha,beta,vl,vr,info = gegv(a,b,compute_vl=1,compute_vr=1,lwork=2*n,overwrite_a=0,overwrite_b=0)
callstatement (*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,b,&n,alpha,beta,vl,&ldvl,vr,&ldvr,work,&lwork,rwork,&info)
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*
integer optional,intent(in):: compute_vl = 1
check(compute_vl==1||compute_vl==0) compute_vl
integer optional,intent(in):: compute_vr = 1
check(compute_vr==1||compute_vr==0) compute_vr
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,copy) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> dimension(n,n),depend(n),intent(in,copy) :: b
check(shape(b,0)==shape(b,1) && shape(b,0)==n) :: b
<type_in> dimension(n),depend(n),intent(out) :: alpha
<type_in> dimension(n),depend(n),intent(out) :: beta
<type_in> dimension(ldvl,n),intent(out),depend(ldvl) :: vl
integer intent(hide),depend(compute_vl,n) :: ldvl=(compute_vl?n:1)
<type_in> dimension(ldvr,n),intent(out),depend(ldvr) :: vr
integer intent(hide),depend(compute_vr,n) :: ldvr=(compute_vr?n:1)
integer optional,intent(in),depend(n) :: lwork=2*n
check(lwork>=2*n) :: lwork
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
<rtype_in> dimension(8*n),intent(hide),depend(n) :: rwork
integer intent(out):: info
end subroutine <tchar=c,z>gegv
subroutine <tchar=s,d>syev(compute_v,lower,n,w,a,work,lwork,info)
! w,v,info = syev(a,compute_v=1,lower=0,lwork=3*n-1,overwrite_a=0)
! Compute all eigenvalues and, optionally, eigenvectors of a
! real symmetric matrix A.
!
! Performance tip:
! If compute_v=0 then set also overwrite_a=1.
callstatement (*f2py_func)((compute_v?"V":"N"),(lower?"L":"U"),&n,a,&n,w,work,&lwork,&info)
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*
integer optional,intent(in):: compute_v = 1
check(compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer intent(hide),depend(a):: n = shape(a,0)
<type_in> dimension(n,n),check(shape(a,0)==shape(a,1)) :: a
intent(in,copy,out,out=v) :: a
<type_in> dimension(n),intent(out),depend(n) :: w
integer optional,intent(in),depend(n) :: lwork=3*n-1
check(lwork>=3*n-1) :: lwork
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
integer intent(out) :: info
end subroutine <tchar=s,d>syev
subroutine <tchar=c,z>heev(compute_v,lower,n,w,a,work,lwork,rwork,info)
! w,v,info = syev(a,compute_v=1,lower=0,lwork=3*n-1,overwrite_a=0)
! Compute all eigenvalues and, optionally, eigenvectors of a
! complex Hermitian matrix A.
!
! Warning:
! If compute_v=0 and overwrite_a=1, the contents of a is destroyed.
callstatement (*f2py_func)((compute_v?"V":"N"),(lower?"L":"U"),&n,a,&n,w,work,&lwork,rwork,&info)
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<rtype_in_c>*,int*
integer optional,intent(in):: compute_v = 1
check(compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer intent(hide),depend(a):: n = shape(a,0)
<type_in> dimension(n,n),check(shape(a,0)==shape(a,1)) :: a
intent(in,copy,out,out=v) :: a
<rtype_in> dimension(n),intent(out),depend(n) :: w
integer optional,intent(in),depend(n) :: lwork=2*n-1
check(lwork>=2*n-1) :: lwork
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
<rtype_in> dimension(3*n-1),intent(hide),depend(n) :: rwork
integer intent(out) :: info
end subroutine <tchar=c,z>heev
subroutine <tchar=s,d,c,z>posv(n,nrhs,a,b,info,lower)
! c,x,info = posv(a,b,lower=0,overwrite_a=0,overwrite_b=0)
! Solve A * X = B.
! A is symmetric positive defined
! A = U^T * U, C = U if lower = 0
! A = L * L^T, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
callstatement (*f2py_func)((lower?"L":"U"),&n,&nrhs,a,&n,b,&n,&info)
callprotoargument char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer depend(a),intent(hide):: n = shape(a,0)
integer depend(b),intent(hide):: nrhs = shape(b,1)
<type_in> dimension(n,n),intent(in,out,copy,out=c) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> dimension(n,nrhs),intent(in,out,copy,out=x),depend(n):: b
check(shape(a,0)==shape(b,0)) :: b
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>posv
subroutine <tchar=s,d>potrf(n,a,info,lower,clean)
! c,info = potrf(a,lower=0,clean=1,overwrite_a=0)
! Compute Cholesky decomposition of symmetric positive defined matrix:
! A = U^T * U, C = U if lower = 0
! A = L * L^T, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
! clean==1 zeros strictly lower or upper parts of U or L, respectively
callstatement (*f2py_func)((lower?"L":"U"),&n,a,&n,&info); if(clean){int i,j;if(lower){for(i=0;i<n;++i) for(j=i+1;j<n;++j) *(a+j*n+i)=0.0;} else {for(i=0;i<n;++i) for(j=i+1;j<n;++j) *(a+i*n+j)=0.0;}}
callprotoargument char*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,intent(in),check(clean==0||clean==1) :: clean = 1
integer depend(a),intent(hide):: n = shape(a,0)
<type_in> dimension(n,n),intent(in,out,copy,out=c) :: a
check(shape(a,0)==shape(a,1)) :: a
integer intent(out) :: info
end subroutine <tchar=s,d>potrf
subroutine <tchar=c,z>potrf(n,a,info,lower,clean)
! c,info = potrf(a,lower=0,clean=1,overwrite_a=0)
! Compute Cholesky decomposition of symmetric positive defined matrix:
! A = U^H * U, C = U if lower = 0
! A = L * L^H, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
! clean==1 zeros strictly lower or upper parts of U or L, respectively
callstatement (*f2py_func)((lower?"L":"U"),&n,a,&n,&info); if(clean){int i,j,k;if(lower){for(i=0;i<n;++i) for(j=i+1;j<n;++j) {k=j*n+i;(a+k)->r=(a+k)->i=0.0;}} else {for(i=0;i<n;++i) for(j=i+1;j<n;++j) {k=i*n+j;(a+k)->r=(a+k)->i=0.0;}}}
callprotoargument char*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,intent(in),check(clean==0||clean==1) :: clean = 1
integer depend(a),intent(hide):: n = shape(a,0)
<type_in> dimension(n,n),intent(in,out,copy,out=c) :: a
check(shape(a,0)==shape(a,1)) :: a
integer intent(out) :: info
end subroutine <tchar=c,z>potrf
subroutine <tchar=s,d,c,z>potrs(n,nrhs,c,b,info,lower)
! x,info = potrs(c,b,lower=0=1,overwrite_b=0)
! Solve A * X = B.
! A is symmetric positive defined
! A = U^T * U, C = U if lower = 0
! A = L * L^T, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
callstatement (*f2py_func)((lower?"L":"U"),&n,&nrhs,c,&n,b,&n,&info)
callprotoargument char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer depend(c),intent(hide):: n = shape(c,0)
integer depend(b),intent(hide):: nrhs = shape(b,1)
<type_in> dimension(n,n),intent(in) :: c
check(shape(c,0)==shape(c,1)) :: c
<type_in> dimension(n,nrhs),intent(in,out,copy,out=x),depend(n):: b
check(shape(c,0)==shape(b,0)) :: b
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>potrs
subroutine <tchar=s,d,c,z>potri(n,c,info,lower)
! inv_a,info = potri(c,lower=0,overwrite_c=0)
! Compute A inverse A^-1.
! A = U^T * U, C = U if lower = 0
! A = L * L^T, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
callstatement (*f2py_func)((lower?"L":"U"),&n,c,&n,&info)
callprotoargument char*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer depend(c),intent(hide):: n = shape(c,0)
<type_in> dimension(n,n),intent(c,in,out,copy,out=inv_a) :: c
check(shape(c,0)==shape(c,1)) :: c
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>potri
subroutine <tchar=s,d,c,z>lauum(n,c,info,lower)
! a,info = lauum(c,lower=0,overwrite_c=0)
! Compute product
! U^T * U, C = U if lower = 0
! L * L^T, C = L if lower = 1
! C is triangular matrix of the corresponding Cholesky decomposition.
callstatement (*f2py_func)((lower?"L":"U"),&n,c,&n,&info)
callprotoargument char*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer depend(c),intent(hide):: n = shape(c,0)
<type_in> dimension(n,n),intent(in,out,copy,out=a) :: c
check(shape(c,0)==shape(c,1)) :: c
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>lauum
subroutine <tchar=s,d,c,z>trtri(n,c,info,lower,unitdiag)
! inv_c,info = trtri(c,lower=0,unitdiag=1,overwrite_c=0)
! Compute C inverse C^-1 where
! C = U if lower = 0
! C = L if lower = 1
! C is non-unit triangular matrix if unitdiag = 0
! C is unit triangular matrix if unitdiag = 1
callstatement (*f2py_func)((lower?"L":"U"),(unitdiag?"U":"N"),&n,c,&n,&info)
callprotoargument char*,char*,int*,<type_in_c>*,int*,int*
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,intent(in),check(unitdiag==0||unitdiag==1) :: unitdiag = 0
integer depend(c),intent(hide):: n = shape(c,0)
<type_in> dimension(n,n),intent(in,out,copy,out=inv_c) :: c
check(shape(c,0)==shape(c,1)) :: c
integer intent(out) :: info
end subroutine <tchar=s,d,c,z>trtri
subroutine <tchar=s,d,c,z>laswp(n,a,nrows,k1,k2,piv,off,inc,m)
! a = laswp(a,piv,k1=0,k2=len(piv)-1,off=0,inc=1,overwrite_a=0)
! Perform row interchanges on the matrix A for each of row k1 through k2
!
! piv pivots rows.
callstatement {int i;m=len(piv);for(i=0;i<m;++piv[i++]);++k1;++k2; (*f2py_func)(&n,a,&nrows,&k1,&k2,piv+off,&inc); for(i=0;i<m;--piv[i++]);}
callprotoargument int*,<type_in_c>*,int*,int*,int*,int*,int*
integer depend(a),intent(hide):: nrows = shape(a,0)
integer depend(a),intent(hide):: n = shape(a,1)
<type_in> dimension(nrows,n),intent(in,out,copy) :: a
integer dimension(*),intent(in),depend(nrows) :: piv
check(len(piv)<=nrows) :: piv
!XXX: how to check that all elements in piv are < n?
integer optional,intent(in) :: k1 = 0
check(0<=k1) :: k1
integer optional,intent(in),depend(k1,piv,off) :: k2 = len(piv)-1
check(k1<=k2 && k2<len(piv)-off) :: k2
integer optional, intent(in),check(inc>0||inc<0) :: inc = 1
integer optional,intent(in),depend(piv) :: off=0
check(off>=0 && off<len(piv)) :: off
integer intent(hide),depend(piv,inc,off) :: m = (len(piv)-off)/abs(inc)
check(len(piv)-off>(m-1)*abs(inc)) :: m
end subroutine <tchar=s,d,c,z>laswp
subroutine <tchar=c,z>gees(compute_v,sort_t,<tchar>select,n,a,nrows,sdim,w,vs,ldvs,work,lwork,rwork,bwork,info)
! t,sdim,w,vs,work,info=gees(compute_v=1,sort_t=0,select,a,lwork=3*n)
! For an NxN matrix compute the eigenvalues, the schur form T, and optionally
! the matrix of Schur vectors Z. This gives the Schur factorization
! A = Z * T * Z^H -- a complex matrix is in Schur form if it is upper
! triangular
callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_<tchar>select_in_<tchar>gees__user__routines,&n,a,&nrows,&sdim,w,vs,&ldvs,work,&lwork,rwork,bwork,&info,1,1)
callprotoargument char*,char*,int(*)(<type_in_c>*),int*,<type_in_c>*,int*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*,int*,int,int
use <tchar>gees__user__routines
integer optional,intent(in),check(compute_v==0||compute_v==1) :: compute_v = 1
integer optional,intent(in),check(sort_t==0||sort_t==1) :: sort_t = 0
external <tchar>select
integer intent(hide),depend(a) :: n = shape(a,1)
<type_in> intent(in,out,copy,out=t),check(shape(a,0)==shape(a,1)),dimension(n,n) :: a
integer intent(hide),depend(a) :: nrows=shape(a,0)
integer intent(out) :: sdim=0
<type_in> intent(out),dimension(n) :: w
<type_in> intent(out),depend(ldvs,n),dimension(ldvs,n) :: vs
integer intent(hide),depend(compute_v,n) :: ldvs=((compute_v==1)?n:1)
<type_in> intent(out),depend(lwork),dimension(MAX(lwork,1)) :: work
integer optional,intent(in),check((lwork==-1)||(lwork >= MAX(1,2*n))),depend(n) :: lwork = 3*n
<rtype_in> optional,intent(hide),depend(n),dimension(n) :: rwork
logical optional,intent(hide),depend(n),dimension(n) :: bwork
integer intent(out) :: info
end subroutine <tchar=c,z>gees
subroutine <tchar=d,s>gees(compute_v,sort_t,<tchar>select,n,a,nrows,sdim,wr,wi,vs,ldvs,work,lwork,bwork,info)
! t,sdim,w,vs,work,info=gees(compute_v=1,sort_t=0,select,a,lwork=3*n)
! For an NxN matrix compute the eigenvalues, the schur form T, and optionally
! the matrix of Schur vectors Z. This gives the Schur factorization
! A = Z * T * Z^H -- a real matrix is in Schur form if it is upper quasi-
! triangular with 1x1 and 2x2 blocks.
callstatement (*f2py_func)((compute_v?"V":"N"),(sort_t?"S":"N"),cb_<tchar>select_in_<tchar>gees__user__routines,&n,a,&nrows,&sdim,wr,wi,vs,&ldvs,work,&lwork,bwork,&info,1,1)
callprotoargument char*,char*,int(*)(<type_in_c>*,<type_in_c>*),int*,<type_in_c>*,int*,int*,<type_in_c>*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,int*,int*,int,int
use <tchar>gees__user__routines
integer optional,intent(in),check(compute_v==0||compute_v==1) :: compute_v = 1
integer optional,intent(in),check(sort_t==0||sort_t==1) :: sort_t = 0
external <tchar>select
integer intent(hide),depend(a) :: n = shape(a,1)
<type_in> intent(in,out,copy,out=t),check(shape(a,0)==shape(a,1)),dimension(n,n) :: a
integer intent(hide),depend(a) :: nrows=shape(a,0)
integer intent(out) :: sdim=0
<type_in> intent(out),dimension(n) :: wr
<type_in> intent(out),dimension(n) :: wi
<type_in> intent(out),depend(ldvs,n),dimension(ldvs,n) :: vs
integer intent(hide),depend(compute_v,n) :: ldvs=((compute_v==1)?n:1)
<type_in> intent(out),depend(lwork),dimension(MAX(lwork,1)) :: work
integer optional,intent(in),check((lwork==-1)||(lwork >= MAX(1,2*n))),depend(n) :: lwork = 3*n
<rtype_in> optional,intent(hide),depend(n),dimension(n) :: rwork
logical optional,intent(hide),depend(n),dimension(n) :: bwork
integer intent(out) :: info
end subroutine <tchar=s,d>gees
subroutine <tchar=s,d>ggev(compute_vl,compute_vr,n,a,b,alphar,alphai,beta,vl,ldvl,vr,ldvr,work,lwork,info)
callstatement {(*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,b,&n,alphar,alphai,beta,vl,&ldvl,vr,&ldvr,work,&lwork,&info);}
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,int*
integer optional,intent(in):: compute_vl = 1
check(compute_vl==1||compute_vl==0) compute_vl
integer optional,intent(in):: compute_vr = 1
check(compute_vr==1||compute_vr==0) compute_vr
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,copy) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> intent(in,copy), dimension(n,n) :: b
check(shape(b,0)==shape(b,1)) :: b
<type_in> intent(out), dimension(n), depend(n) :: alphar
<type_in> intent(out), dimension(n), depend(n) :: alphai
<type_in> intent(out), dimension(n), depend(n) :: beta
<type_in> depend(ldvl,n), dimension(ldvl,n),intent(out) :: vl
integer intent(hide),depend(n,compute_vl) :: ldvl=(compute_vl?n:1)
<type_in> depend(ldvr,n), dimension(ldvr,n),intent(out) :: vr
integer intent(hide),depend(n,compute_vr) :: ldvr=(compute_vr?n:1)
integer optional,intent(in),depend(n,compute_vl,compute_vr) :: lwork=8*n
check((lwork==-1) || (lwork>=MAX(1,8*n))) :: lwork
<type_in> intent(out), dimension(MAX(lwork,1)), depend(lwork) :: work
integer intent(out):: info
end subroutine <tchar>ggev
subroutine <tchar=c,z>ggev(compute_vl,compute_vr,n,a,b,alpha,beta,vl,ldvl,vr,ldvr,work,lwork,rwork,info)
callstatement {(*f2py_func)((compute_vl?"V":"N"),(compute_vr?"V":"N"),&n,a,&n,b,&n,alpha,beta,vl,&ldvl,vr,&ldvr,work,&lwork,rwork,&info);}
callprotoargument char*,char*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*
integer optional,intent(in):: compute_vl = 1
check(compute_vl==1||compute_vl==0) compute_vl
integer optional,intent(in):: compute_vr = 1
check(compute_vr==1||compute_vr==0) compute_vr
integer intent(hide),depend(a) :: n = shape(a,0)
<type_in> dimension(n,n),intent(in,copy) :: a
check(shape(a,0)==shape(a,1)) :: a
<type_in> intent(in,copy), dimension(n,n) :: b
check(shape(b,0)==shape(b,1)) :: b
<type_in> intent(out), dimension(n), depend(n) :: alpha
<type_in> intent(out), dimension(n), depend(n) :: beta
<type_in> depend(ldvl,n), dimension(ldvl,n),intent(out) :: vl
integer intent(hide),depend(n,compute_vl) :: ldvl=(compute_vl?n:1)
<type_in> depend(ldvr,n), dimension(ldvr,n),intent(out) :: vr
integer intent(hide),depend(n,compute_vr) :: ldvr=(compute_vr?n:1)
integer optional,intent(in),depend(n,compute_vl,compute_vr) :: lwork=2*n
check((lwork==-1) || (lwork>=MAX(1,2*n))) :: lwork
<type_in> intent(out), dimension(MAX(lwork,1)), depend(lwork) :: work
<rtype_in> intent(hide), dimension(8*n), depend(n) :: rwork
integer intent(out):: info
end subroutine <tchar>ggev
! if anything is wrong with the following wrappers (until *gbtrs)
! blame Arnd Baecker and Johannes Loehnert and not Pearu
subroutine <tchar=s,d>sbev(ab,compute_v,lower,n,ldab,kd,w,z,ldz,work,info) ! in :Band:dsbev.f
! principally <s,d>sbevd does the same, and are recommended for use.
! (see man dsbevd)
callstatement (*f2py_func)((compute_v?"V":"N"),(lower?"L":"U"),&n,&kd,ab,&ldab,w,z,&ldz,work,&info)
callprotoargument char*,char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*
! Remark: if ab is fortran contigous on input
! and overwrite_ab=1 ab will be overwritten.
<type_in> dimension(ldab,*), intent(in,overwrite) :: ab
integer optional,intent(in):: compute_v = 1
check(compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
<type_in> dimension(n),intent(out),depend(n) :: w
! For compute_v=1 z is used and contains the eigenvectors
integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
<type_in> dimension(ldz,ldz),intent(out),depend(ldz) :: z
<type_in> dimension(MAX(1,3*n-1)),intent(hide),depend(n) :: work
integer intent(out)::info
end subroutine <tchar=s,d>sbev
subroutine <tchar=s,d>sbevd(ab,compute_v,lower,n,ldab,kd,w,z,ldz,work,lwork,iwork,liwork,info) ! in :Band:dsbevd.f
callstatement (*f2py_func)((compute_v?"V":"N"),(lower?"L":"U"),&n,&kd,ab,&ldab,w,z,&ldz,work,&lwork,iwork,&liwork,&info)
callprotoargument char*,char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,int*,int*,int*
! Remark: if ab is fortran contigous on input
! and overwrite_ab=1 ab will be overwritten.
<type_in> dimension(ldab,*), intent(in, overwrite) :: ab
integer optional,intent(in):: compute_v = 1
check( compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
<type_in> dimension(n),intent(out),depend(n) :: w
<type_in> dimension(ldz,ldz),intent(out),depend(ldz) :: z
! For compute_v=1 z is used and contains the eigenvectors
integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
<type_in> dimension(ldz,ldz),depend(ldz) :: z
integer intent(hide),depend(n) :: lwork=(compute_v?1+5*n+2*n*n:2*n)
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
integer intent(out)::info
integer optional,check(liwork>=(compute_v?3+5*n:1)),depend(n) :: liwork=(compute_v?3+5*n:1)
integer intent(hide),dimension(liwork),depend(liwork) :: iwork
end subroutine <tchar=s,d>sbevd
subroutine <tchar=s,d>sbevx(ab,ldab,compute_v,range,lower,n,kd,q,ldq,vl,vu,il,iu,abstol,w,z,m,mmax,ldz,work,iwork,ifail,info) ! in :Band:dsbevx.f
callstatement (*f2py_func)((compute_v?"V":"N"),(range>0?(range==1?"V":"I"):"A"),(lower?"L":"U"),&n,&kd,ab,&ldab,q,&ldq,&vl,&vu,&il,&iu,&abstol,&m,w,z,&ldz,work,iwork,ifail,&info)
callprotoargument char*,char*,char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,int*,<type_in_c>*,int*,<type_in_c>*,<type_in_c>*,int*,<type_in_c>*, int*,int*,int*
integer optional,intent(in):: compute_v = 1
check(compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
integer optional,intent(in):: range = 0
check(range==2||range==1||range==0) range
! Remark: if ab is fortran contigous on input
! and overwrite_ab=1 ab will be overwritten.
<type_in> dimension(ldab,*),intent(in, overwrite) :: ab
! FIXME: do we need to make q available for outside usage ???
! If so: how to make this optional
!* Q (output) DOUBLE PRECISION array, dimension (LDQ, N)
!* If JOBZ = 'V', the N-by-N orthogonal matrix used in the
!* reduction to tridiagonal form.
!* If JOBZ = 'N', the array Q is not referenced.
integer intent(hide),depend(n) :: ldq=(compute_v?n:1)
<type_in> dimension(ldq,ldq),intent(hide),depend(ldq) :: q
<type_in> :: vl
<type_in> :: vu
integer,check((il>=1 && il<=n)),depend(n) :: il
integer,check((iu>=1 && iu<=n && iu>=il)),depend(n,il) :: iu
! Remark, we don't use python indexing here, because
! if someone uses ?sbevx directly,
! he should expect Fortran style indexing.
!integer,check((il>=0 && il<n)),depend(n) :: il+1
!integer,check((iu>=0 && iu<n && iu>=il)),depend(n,il) :: iu+1
! Remark:
! Eigenvalues will be computed most accurately when ABSTOL is
! set to twice the underflow threshold 2*DLAMCH('S'), not zero.
!
! The easiest is to wrap DLAMCH (done below)
! and let the user provide the value.
<type_in> optional,intent(in):: abstol=0.0
<type_in> dimension(n),intent(out),depend(n) :: w
<type_in> dimension(ldz,mmax),intent(out) :: z
integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
! We use the mmax parameter to fix the size of z
! (only if eigenvalues are requested)
! Otherwise we would allocate a (possibly) huge
! region of memory for the eigenvectors, even
! in cases where only a few are requested.
! If RANGE = 'V' (range=1) we a priori don't know the
! number of eigenvalues in the interval in advance.
! As default we use the maximum value
! but the user should use an appropriate mmax.
integer intent(in),depend(n) :: mmax=(compute_v?(range==2?(iu-il+1):n):1)
integer intent(out) :: m
<type_in> dimension(7*n),intent(hide) :: work
integer dimension(5*n),intent(hide) :: iwork
integer dimension((compute_v?n:1)),intent(out) :: ifail
integer intent(out):: info
end subroutine <tchar=s,d>sbevx
subroutine <tchar=c,z>hbevd(ab,compute_v,lower,n,ldab,kd,w,z,ldz,work,lwork,rwork,lrwork,iwork,liwork,info) ! in :Band:zubevd.f
callstatement (*f2py_func)((compute_v?"V":"N"),(lower?"L":"U"),&n,&kd,ab,&ldab,w,z,&ldz,work,&lwork,rwork,&lrwork,iwork,&liwork,&info)
callprotoargument char*,char*,int*,int*,<type_in_c>*,int*,<rtype_in_c>*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,int*,int*,int*,int*
! Remark: if ab is fortran contigous on input
! and overwrite_ab=1 ab will be overwritten.
<type_in> dimension(ldab,*), intent(in, overwrite) :: ab
integer optional,intent(in):: compute_v = 1
check( compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
! case n=0 is omitted in calculaton of lwork, lrwork, liwork
! so we forbid it
check( n>0 ) n
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
<rtype_in> dimension(n),intent(out),depend(n) :: w
! For compute_v=1 z is used and contains the eigenvectors
integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
<type_in> dimension(ldz,ldz),intent(out),depend(ldz) :: z
integer intent(hide),depend(n) :: lwork=(compute_v?2*n*n:n)
<type_in> dimension(lwork),intent(hide),depend(lwork) :: work
integer intent(out)::info
integer optional, check(lrwork>=(compute_v?1+5*n+2*n*n:n)),depend(n) :: lrwork=(compute_v?1+5*n+2*n*n:n)
<rtype_in> intent(hide),dimension(lrwork),depend(lrwork) :: rwork
! documentation says liwork >=2+5*n, but that crashes, +1 helps
integer optional, check(liwork>=(compute_v?3+5*n:1)),depend(n) :: liwork=(compute_v?3+5*n:1)
integer intent(hide),dimension(liwork),depend(liwork) :: iwork
end subroutine <tchar=c,z>hbevd
subroutine <tchar=c,z>hbevx(ab,ldab,compute_v,range,lower,n,kd,q,ldq,vl,vu,il,iu,abstol,w,z,m,mmax,ldz,work,rwork,iwork,ifail,info) ! in :Band:dsbevx.f
callstatement (*f2py_func)((compute_v?"V":"N"),(range>0?(range==1?"V":"I"):"A"),(lower?"L":"U"),&n,&kd,ab,&ldab,q,&ldq,&vl,&vu,&il,&iu,&abstol,&m,w,z,&ldz,work,rwork,iwork,ifail,&info)
callprotoargument
char*,char*,char*,int*,int*,<type_in_c>*,int*,<type_in_c>*,int*,<rtype_in_c>*,<rtype_in_c>*,int*,int*,<rtype_in_c>*,int*,<rtype_in_c>*,<type_in_c>*,int*,<type_in_c>*,<rtype_in_c>*,int*,int*,int*
integer optional,intent(in):: compute_v = 1
check(compute_v==1||compute_v==0) compute_v
integer optional,intent(in),check(lower==0||lower==1) :: lower = 0
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer intent(hide),depend(ab) :: n=shape(ab,1)
integer intent(hide),depend(ab) :: kd=shape(ab,0)-1
integer optional,intent(in):: range = 0
check(range==2||range==1||range==0) range
! Remark: if ab is fortran contigous on input
! and overwrite_ab=1 ab will be overwritten.
<type_in> dimension(ldab,*),intent(in, overwrite) :: ab
! FIXME: do we need to make q available for outside usage ???
! If so: how to make this optional
!* Q (output) DOUBLE PRECISION array, dimension (LDQ, N)
!* If JOBZ = 'V', the N-by-N orthogonal matrix used in the
!* reduction to tridiagonal form.
!* If JOBZ = 'N', the array Q is not referenced.
integer intent(hide),depend(n) :: ldq=(compute_v?n:1)
<type_in> dimension(ldq,ldq),intent(hide),depend(ldq) :: q
<rtype_in> :: vl
<rtype_in> :: vu
integer,check((il>=1 && il<=n)),depend(n) :: il
integer,check((iu>=1 && iu<=n && iu>=il)),depend(n,il) :: iu
! Remark, we don't use python indexing here, because
! if someone uses ?sbevx directly,
! he should expect Fortran style indexing.
!integer,check((il>=0 && il<n)),depend(n) :: il+1
!integer,check((iu>=0 && iu<n && iu>=il)),depend(n,il) :: iu+1
! Remark:
! Eigenvalues will be computed most accurately when ABSTOL is
! set to twice the underflow threshold 2*DLAMCH('S'), not zero.
!
! The easiest is to wrap DLAMCH (done below)
! and let the user provide the value.
<rtype_in> optional,intent(in):: abstol=0.0
<rtype_in> dimension(n),intent(out),depend(n) :: w
<type_in> dimension(ldz,mmax),intent(out) :: z
integer intent(hide),depend(n) :: ldz=(compute_v?n:1)
! We use the mmax parameter to fix the size of z
! (only if eigenvalues are requested)
! Otherwise we would allocate a (possibly) huge
! region of memory for the eigenvectors, even
! in cases where only a few are requested.
! If RANGE = 'V' (range=1) we a priori don't know the
! number of eigenvalues in the interval in advance.
! As default we use the maximum value
! but the user should use an appropriate mmax.
integer intent(in),depend(n) :: mmax=(compute_v?(range==2?(iu-il+1):n):1)
integer intent(out) :: m
<type_in> dimension(n),intent(hide) :: work
<rtype_in> dimension(7*n),intent(hide) :: rwork
integer dimension(5*n),intent(hide) :: iwork
integer dimension((compute_v?n:1)),intent(out) :: ifail
integer intent(out):: info
end subroutine <tchar=c,z>hbevx
! dlamch = dlamch(cmach)
!
! determine double precision machine parameters
! CMACH (input) CHARACTER*1
! Specifies the value to be returned by DLAMCH:
! = 'E' or 'e', DLAMCH := eps
! = 'S' or 's , DLAMCH := sfmin
! = 'B' or 'b', DLAMCH := base
! = 'P' or 'p', DLAMCH := eps*base
! = 'N' or 'n', DLAMCH := t
! = 'R' or 'r', DLAMCH := rnd
! = 'M' or 'm', DLAMCH := emin
! = 'U' or 'u', DLAMCH := rmin
! = 'L' or 'l', DLAMCH := emax
! = 'O' or 'o', DLAMCH := rmax
!
! where
!
! eps = relative machine precision
! sfmin = safe minimum, such that 1/sfmin does not overflow
! base = base of the machine
! prec = eps*base
! t = number of (base) digits in the mantissa
! rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
! emin = minimum exponent before (gradual) underflow
! rmin = underflow threshold - base**(emin-1)
! emax = largest exponent before overflow
! rmax = overflow threshold - (base**emax)*(1-eps)
function <tchar=s,d>lamch(cmach)
character :: cmach
<type_in> intent(out):: dlamch
end function <tchar=s,d>lamch
! lu,ipiv,info = dgbtrf(ab,kl,ku,[m,n,ldab,overwrite_ab])
! Compute an LU factorization of a real m-by-n band matrix
subroutine <tchar=s,d,c,z>gbtrf(m,n,ab,kl,ku,ldab,ipiv,info) ! in :Band:dgbtrf.f
! threadsafe ! FIXME: should this be added ?
callstatement {int i;(*f2py_func)(&m,&n,&kl,&ku,ab,&ldab,ipiv,&info); for(i=0,n=MIN(m,n);i<n;--ipiv[i++]);}
callprotoargument int*,int*,int*,int*,<type_in_c>*,int*,int*,int*
! let the default be a square matrix:
integer optional,depend(ab) :: m=shape(ab,1)
integer optional,depend(ab) :: n=shape(ab,1)
integer :: kl
integer :: ku
<type_in> dimension(ldab,*),intent(in,out,copy,out=lu) :: ab
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer dimension(MIN(m,n)),depend(m,n),intent(out) :: ipiv
integer intent(out):: info
end subroutine <tchar=s,d,c,z>gbtrf
subroutine <tchar=s,d,c,z>gbtrs(ab,kl,ku,b,ipiv,trans,n,nrhs,ldab,ldb,info) ! in :Band:dgbtrs.f
! x,info = dgbtrs(ab,kl,ku,b,ipiv,[trans,n,ldab,ldb,overwrite_b])
! solve a system of linear equations A * X = B or A' * X = B
! with a general band matrix A using the LU factorization
! computed by DGBTRF
!
! TRANS Specifies the form of the system of equations.
! 0 = 'N': A * X =B (No transpose)
! 1 = 'T': A'* X = B (Transpose)
! 2 = 'C': A'* X = B (Conjugate transpose = Transpose)
callstatement {int i;for(i=0;i<n;++ipiv[i++]);(*f2py_func)((trans>0?(trans==1?"T":"C"):"N"),&n,&kl,&ku,&nrhs,ab,&ldab,ipiv,b,&ldb,&info);for(i=0;i<n;--ipiv[i++]);}
lprotoargument char*,int*,int *,int*,int*,<type_in_c>*,int*,int*,<type_in_c>*,int*,int*
!character optional:: trans='N'
integer optional:: trans=0
integer optional,depend(ab) :: n=shape(ab,1)
integer :: kl
integer :: ku
integer intent(hide),depend(b):: nrhs=shape(b,1)
<type_in> dimension(ldab,*),intent(in) :: ab
integer optional,check(shape(ab,0)==ldab),depend(ab) :: ldab=shape(ab,0)
integer dimension(n),intent(in) :: ipiv
<type_in> dimension(ldb,*),intent(in,out,copy,out=x) :: b
integer optional,check(shape(b,0)==ldb),depend(b) :: ldb=shape(b,0)
integer optional,check(shape(b,0)==ldb),depend(b) :: ldb=shape(b,0)
integer intent(out):: info
end subroutine <tchar=s,d,c,z>gbtrs
!
! RRR routines for standard eigenvalue problem
!
subroutine ssyevr(jobz,range,uplo,n,a,lda,vl,vu,il,iu,abstol,m,w,z,ldz,isuppz,work,lwork,iwork,liwork,info)
! Standard Eigenvalue Problem
! simple/expert driver: all eigenvectors or optionally selected eigenvalues
! algorithm: Relatively Robust Representation
! matrix storage
! Real - Single precision
character intent(in) :: jobz='V'
character intent(in) :: range='A'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
real intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
real intent(hide) :: vl=0
real intent(hide) :: vu=1
integer optional,intent(in) :: il=1
integer optional,intent(in),depend(n) :: iu=n
real intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
real intent(out),dimension(n),depend(n) :: w
real intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(hide),dimension(2*m) :: isuppz
integer intent(in),depend(n) :: lwork=26*n
real intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n):: liwork=10*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine ssyevr
subroutine dsyevr(jobz,range,uplo,n,a,lda,vl,vu,il,iu,abstol,m,w,z,ldz,isuppz,work,lwork,iwork,liwork,info)
! Standard Eigenvalue Problem
! simple/expert driver: all eigenvectors or optionally selected eigenvalues
! algorithm: Relatively Robust Representation
! matrix storage
! Real - Double precision
character intent(in) :: jobz='V'
character intent(in) :: range='A'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
double precision intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
double precision intent(hide) :: vl=0
double precision intent(hide) :: vu=1
integer optional,intent(in) :: il=1
integer optional,intent(in),depend(n) :: iu=n
double precision intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
double precision intent(out),dimension(n),depend(n) :: w
double precision intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(hide),dimension(2*m) :: isuppz
integer intent(in),depend(n) :: lwork=26*n
double precision intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n):: liwork=10*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine dsyevr
subroutine cheevr(jobz,range,uplo,n,a,lda,vl,vu,il,iu,abstol,m,w,z,ldz,isuppz,work,lwork,rwork,lrwork,iwork,liwork,info)
! Standard Eigenvalue Problem
! simple/expert driver: all eigenvectors or optionally selected eigenvalues
! algorithm: Relatively Robust Representation
! matrix storage
! Complex - Single precision
character intent(in) :: jobz='V'
character intent(in) :: range='A'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
real intent(hide) :: vl=0
real intent(hide) :: vu=1
integer optional,intent(in) :: il=1
integer optional,intent(in),depend(n) :: iu=n
real intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
real intent(out),dimension(n),depend(n) :: w
complex intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(hide),dimension(2*m) :: isuppz
integer intent(in),depend(n) :: lwork=18*n
complex intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n) :: lrwork=24*n
real intent(hide),dimension(lrwork) :: rwork
integer intent(hide),depend(n):: liwork=10*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine cheevr
subroutine zheevr(jobz,range,uplo,n,a,lda,vl,vu,il,iu,abstol,m,w,z,ldz,isuppz,work,lwork,rwork,lrwork,iwork,liwork,info)
! Standard Eigenvalue Problem
! simple/expert driver: all eigenvectors or optionally selected eigenvalues
! algorithm: Relatively Robust Representation
! matrix storage
! Complex - Double precision
character intent(in) :: jobz='V'
character intent(in) :: range='A'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex*16 intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
double precision intent(hide) :: vl=0
double precision intent(hide) :: vu=1
integer optional,intent(in) :: il=1
integer optional,intent(in),depend(n) :: iu=n
double precision intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
double precision intent(out),dimension(n),depend(n) :: w
complex*16 intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(hide),dimension(2*m) :: isuppz
integer intent(in),depend(n) :: lwork=18*n
complex*16 intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n) :: lrwork=24*n
double precision intent(hide),dimension(lrwork) :: rwork
integer intent(hide),depend(n):: liwork=10*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine zheevr
subroutine ssygv(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: standard
! matrix storage
! Real - Single precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
real intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
real intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
real intent(out),dimension(n),depend(n) :: w
integer intent(hide) :: lwork=3*n-1
real intent(hide),dimension(lwork) :: work
integer intent(out) :: info
end subroutine ssygv
subroutine dsygv(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: standard
! matrix storage
! Real - Double precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
double precision intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
double precision intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
double precision intent(out),dimension(n),depend(n) :: w
integer intent(hide) :: lwork=3*n-1
double precision intent(hide),dimension(lwork) :: work
integer intent(out) :: info
end subroutine dsygv
subroutine chegv(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,rwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: standard
! matrix storage
! Complex - Single precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
complex intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
real intent(out),dimension(n),depend(n) :: w
integer intent(hide) :: lwork=18*n-1
complex intent(hide),dimension(lwork) :: work
real intent(hide),dimension(3*n-2) :: rwork
integer intent(out) :: info
end subroutine chegv
subroutine zhegv(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,rwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: standard
! matrix storage
! Complex - Double precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex*16 intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
complex*16 intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
double precision intent(out),dimension(n),depend(n) :: w
integer intent(hide) :: lwork=18*n-1
complex*16 intent(hide),dimension(lwork) :: work
double precision intent(hide),dimension(3*n-2) :: rwork
integer intent(out) :: info
end subroutine zhegv
!
! Divide and conquer routines for generalized eigenvalue problem
!
subroutine ssygvd(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,iwork,liwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: divide and conquer
! matrix storage
! Real - Single precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
real intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
real intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
real intent(out),dimension(n),depend(n) :: w
integer intent(in),depend(n) :: lwork=1+6*n+2*n*n
real intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n) :: liwork=3+5*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine ssygvd
subroutine dsygvd(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,iwork,liwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: divide and conquer
! matrix storage
! Real - Double precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
double precision intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
double precision intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
double precision intent(out),dimension(n),depend(n) :: w
integer intent(in),depend(n) :: lwork=1+6*n+2*n*n
double precision intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n) :: liwork=3+5*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine dsygvd
subroutine chegvd(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,rwork,lrwork,iwork,liwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: divide and conquer
! matrix storage
! Complex - Single precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
complex intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
real intent(out),dimension(n),depend(n) :: w
integer intent(in),depend(n) :: lwork=2*n+n*n
complex intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n) :: lrwork=1+5*n+2*n*n
real intent(hide),dimension(lrwork) :: rwork
integer intent(hide),depend(n) :: liwork=3+5*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine chegvd
subroutine zhegvd(itype,jobz,uplo,n,a,lda,b,ldb,w,work,lwork,rwork,lrwork,iwork,liwork,info)
! Generalized Eigenvalue Problem
! simple driver (all eigenvectors)
! algorithm: divide and conquer
! matrix storage
! Complex - Double precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex*16 intent(in,copy,out),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
complex*16 intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
double precision intent(out),dimension(n),depend(n) :: w
integer intent(in),depend(n) :: lwork=2*n+n*n
complex*16 intent(hide),dimension(lwork) :: work
integer intent(hide),depend(n) :: lrwork=1+5*n+2*n*n
double precision intent(hide),dimension(lrwork) :: rwork
integer intent(hide),depend(n) :: liwork=3+5*n
integer intent(hide),dimension(liwork) :: iwork
integer intent(out) :: info
end subroutine zhegvd
! Expert routines for generalized eigenvalue problem
!
subroutine ssygvx(itype,jobz,range,uplo,n,a,lda,b,ldb,vl,vu,il,iu,abstol,m,w,z,ldz,work,lwork,iwork,ifail,info)
! Generalized Eigenvalue Problem
! expert driver (selected eigenvectors)
! algorithm: standard
! matrix storage
! Real - Single precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(hide) :: range='I'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
real intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
real intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
real intent(hide) :: vl=0.
real intent(hide) :: vu=0.
integer optional,intent(in) :: il=1
integer intent(in) :: iu
real intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
real intent(out),dimension(n),depend(n) :: w
real intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(in),depend(n) :: lwork=8*n
real intent(hide),dimension(lwork),depend(n,lwork) :: work
integer intent(hide),dimension(5*n) :: iwork
integer intent(out),dimension(n),depend(n) :: ifail
integer intent(out) :: info
end subroutine ssygvx
subroutine dsygvx(itype,jobz,range,uplo,n,a,lda,b,ldb,vl,vu,il,iu,abstol,m,w,z,ldz,work,lwork,iwork,ifail,info)
! Generalized Eigenvalue Problem
! expert driver (selected eigenvectors)
! algorithm: standard
! matrix storage
! Real - Double precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(hide) :: range='I'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
double precision intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
double precision intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
double precision intent(hide) :: vl=0.
double precision intent(hide) :: vu=0.
integer optional,intent(in) :: il=1
integer intent(in) :: iu
double precision intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
double precision intent(out),dimension(n),depend(n) :: w
double precision intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(in),depend(n) :: lwork=8*n
double precision intent(hide),dimension(lwork),depend(n,lwork) :: work
integer intent(hide),dimension(5*n) :: iwork
integer intent(out),dimension(n),depend(n) :: ifail
integer intent(out) :: info
end subroutine dsygvx
subroutine chegvx(itype,jobz,range,uplo,n,a,lda,b,ldb,vl,vu,il,iu,abstol,m,w,z,ldz,work,lwork,rwork,iwork,ifail,info)
! Generalized Eigenvalue Problem
! expert driver (selected eigenvectors)
! algorithm: standard
! matrix storage
! Complex - Single precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(hide) :: range='I'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
complex intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
real intent(hide) :: vl=0.
real intent(hide) :: vu=0.
integer optional,intent(in) :: il=1
integer intent(in) :: iu
real intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
real intent(out),dimension(n),depend(n) :: w
complex intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(in),depend(n) :: lwork=18*n-1
complex intent(hide),dimension(lwork),depend(n,lwork) :: work
real intent(hide),dimension(7*n) :: rwork
integer intent(hide),dimension(5*n) :: iwork
integer intent(out),dimension(n),depend(n) :: ifail
integer intent(out) :: info
end subroutine chegvx
subroutine zhegvx(itype,jobz,range,uplo,n,a,lda,b,ldb,vl,vu,il,iu,abstol,m,w,z,ldz,work,lwork,rwork,iwork,ifail,info)
! Generalized Eigenvalue Problem
! expert driver (selected eigenvectors)
! algorithm: standard
! matrix storage
! Complex - Double precision
integer optional,intent(in) :: itype=1
character intent(in) :: jobz='V'
character intent(hide) :: range='I'
character intent(in) :: uplo='L'
integer intent(hide) :: n=shape(a,0)
complex*16 intent(in,copy),dimension(n,n) :: a
integer intent(hide),depend(n,a) :: lda=n
complex*16 intent(in,copy),dimension(n,n) :: b
integer intent(hide),depend(n,b) :: ldb=n
double precision intent(hide) :: vl=0.
double precision intent(hide) :: vu=0.
integer optional,intent(in) :: il=1
integer intent(in) :: iu
double precision intent(hide) :: abstol=0.
integer intent(hide),depend(iu) :: m=iu-il+1
double precision intent(out),dimension(n),depend(n) :: w
complex*16 intent(out),dimension(n,m),depend(n,m) :: z
integer intent(hide),check(shape(z,0)==ldz),depend(n,z) :: ldz=n
integer intent(in),depend(n) :: lwork=18*n-1
complex*16 intent(hide),dimension(lwork),depend(n,lwork) :: work
double precision intent(hide),dimension(7*n) :: rwork
integer intent(hide),dimension(5*n) :: iwork
integer intent(out),dimension(n),depend(n) :: ifail
integer intent(out) :: info
end subroutine zhegvx
end interface
end python module flapack
! This file was auto-generated with f2py (version:2.10.173).
! See http://cens.ioc.ee/projects/f2py2e/
|