Mercurial > hg > octave-lyh
comparison liboctave/Matrix.h @ 161:21b599370728
[project @ 1993-10-16 17:20:32 by jwe]
author | jwe |
---|---|
date | Sat, 16 Oct 1993 17:21:25 +0000 |
parents | 1b59f5c6c370 |
children | 2db13bf4f3e2 |
comparison
equal
deleted
inserted
replaced
160:be50d501b2a7 | 161:21b599370728 |
---|---|
427 Matrix operator + (double s) const; | 427 Matrix operator + (double s) const; |
428 Matrix operator - (double s) const; | 428 Matrix operator - (double s) const; |
429 Matrix operator * (double s) const; | 429 Matrix operator * (double s) const; |
430 Matrix operator / (double s) const; | 430 Matrix operator / (double s) const; |
431 | 431 |
432 ComplexMatrix operator + (Complex s) const; | 432 ComplexMatrix operator + (const Complex& s) const; |
433 ComplexMatrix operator - (Complex s) const; | 433 ComplexMatrix operator - (const Complex& s) const; |
434 ComplexMatrix operator * (Complex s) const; | 434 ComplexMatrix operator * (const Complex& s) const; |
435 ComplexMatrix operator / (Complex s) const; | 435 ComplexMatrix operator / (const Complex& s) const; |
436 | 436 |
437 // scalar by matrix -> matrix operations | 437 // scalar by matrix -> matrix operations |
438 | 438 |
439 friend Matrix operator + (double s, const Matrix& a); | 439 friend Matrix operator + (double s, const Matrix& a); |
440 friend Matrix operator - (double s, const Matrix& a); | 440 friend Matrix operator - (double s, const Matrix& a); |
628 ColumnVector operator + (double s) const; | 628 ColumnVector operator + (double s) const; |
629 ColumnVector operator - (double s) const; | 629 ColumnVector operator - (double s) const; |
630 ColumnVector operator * (double s) const; | 630 ColumnVector operator * (double s) const; |
631 ColumnVector operator / (double s) const; | 631 ColumnVector operator / (double s) const; |
632 | 632 |
633 ComplexColumnVector operator + (Complex s) const; | 633 ComplexColumnVector operator + (const Complex& s) const; |
634 ComplexColumnVector operator - (Complex s) const; | 634 ComplexColumnVector operator - (const Complex& s) const; |
635 ComplexColumnVector operator * (Complex s) const; | 635 ComplexColumnVector operator * (const Complex& s) const; |
636 ComplexColumnVector operator / (Complex s) const; | 636 ComplexColumnVector operator / (const Complex& s) const; |
637 | 637 |
638 // scalar by column vector -> column vector operations | 638 // scalar by column vector -> column vector operations |
639 | 639 |
640 friend ColumnVector operator + (double s, const ColumnVector& a); | 640 friend ColumnVector operator + (double s, const ColumnVector& a); |
641 friend ColumnVector operator - (double s, const ColumnVector& a); | 641 friend ColumnVector operator - (double s, const ColumnVector& a); |
789 RowVector operator + (double s) const; | 789 RowVector operator + (double s) const; |
790 RowVector operator - (double s) const; | 790 RowVector operator - (double s) const; |
791 RowVector operator * (double s) const; | 791 RowVector operator * (double s) const; |
792 RowVector operator / (double s) const; | 792 RowVector operator / (double s) const; |
793 | 793 |
794 ComplexRowVector operator + (Complex s) const; | 794 ComplexRowVector operator + (const Complex& s) const; |
795 ComplexRowVector operator - (Complex s) const; | 795 ComplexRowVector operator - (const Complex& s) const; |
796 ComplexRowVector operator * (Complex s) const; | 796 ComplexRowVector operator * (const Complex& s) const; |
797 ComplexRowVector operator / (Complex s) const; | 797 ComplexRowVector operator / (const Complex& s) const; |
798 | 798 |
799 // scalar by row vector -> row vector operations | 799 // scalar by row vector -> row vector operations |
800 | 800 |
801 friend RowVector operator + (double s, const RowVector& a); | 801 friend RowVector operator + (double s, const RowVector& a); |
802 friend RowVector operator - (double s, const RowVector& a); | 802 friend RowVector operator - (double s, const RowVector& a); |
965 // diagonal matrix by scalar -> matrix operations | 965 // diagonal matrix by scalar -> matrix operations |
966 | 966 |
967 Matrix operator + (double s) const; | 967 Matrix operator + (double s) const; |
968 Matrix operator - (double s) const; | 968 Matrix operator - (double s) const; |
969 | 969 |
970 ComplexMatrix operator + (Complex s) const; | 970 ComplexMatrix operator + (const Complex& s) const; |
971 ComplexMatrix operator - (Complex s) const; | 971 ComplexMatrix operator - (const Complex& s) const; |
972 | 972 |
973 // diagonal matrix by scalar -> diagonal matrix operations | 973 // diagonal matrix by scalar -> diagonal matrix operations |
974 | 974 |
975 DiagMatrix operator * (double s) const; | 975 DiagMatrix operator * (double s) const; |
976 DiagMatrix operator / (double s) const; | 976 DiagMatrix operator / (double s) const; |
977 | 977 |
978 ComplexDiagMatrix operator * (Complex s) const; | 978 ComplexDiagMatrix operator * (const Complex& s) const; |
979 ComplexDiagMatrix operator / (Complex s) const; | 979 ComplexDiagMatrix operator / (const Complex& s) const; |
980 | 980 |
981 // scalar by diagonal matrix -> matrix operations | 981 // scalar by diagonal matrix -> matrix operations |
982 | 982 |
983 friend Matrix operator + (double s, const DiagMatrix& a); | 983 friend Matrix operator + (double s, const DiagMatrix& a); |
984 friend Matrix operator - (double s, const DiagMatrix& a); | 984 friend Matrix operator - (double s, const DiagMatrix& a); |
1109 | 1109 |
1110 public: | 1110 public: |
1111 ComplexMatrix (void); | 1111 ComplexMatrix (void); |
1112 ComplexMatrix (int r, int c); | 1112 ComplexMatrix (int r, int c); |
1113 ComplexMatrix (int r, int c, double val); | 1113 ComplexMatrix (int r, int c, double val); |
1114 ComplexMatrix (int r, int c, Complex val); | 1114 ComplexMatrix (int r, int c, const Complex& val); |
1115 ComplexMatrix (const Matrix& a); | 1115 ComplexMatrix (const Matrix& a); |
1116 ComplexMatrix (const ComplexMatrix& a); | 1116 ComplexMatrix (const ComplexMatrix& a); |
1117 ComplexMatrix (const DiagMatrix& a); | 1117 ComplexMatrix (const DiagMatrix& a); |
1118 ComplexMatrix (const ComplexDiagMatrix& a); | 1118 ComplexMatrix (const ComplexDiagMatrix& a); |
1119 ComplexMatrix (double a); | 1119 ComplexMatrix (double a); |
1120 ComplexMatrix (Complex a); | 1120 ComplexMatrix (const Complex& a); |
1121 ~ComplexMatrix (void); | 1121 ~ComplexMatrix (void); |
1122 | 1122 |
1123 ComplexMatrix& operator = (const Matrix& a); | 1123 ComplexMatrix& operator = (const Matrix& a); |
1124 ComplexMatrix& operator = (const ComplexMatrix& a); | 1124 ComplexMatrix& operator = (const ComplexMatrix& a); |
1125 | 1125 |
1135 Complex checkelem (int r, int c) const; | 1135 Complex checkelem (int r, int c) const; |
1136 Complex operator () (int r, int c) const; | 1136 Complex operator () (int r, int c) const; |
1137 | 1137 |
1138 ComplexMatrix& resize (int r, int c); | 1138 ComplexMatrix& resize (int r, int c); |
1139 ComplexMatrix& resize (int r, int c, double val); | 1139 ComplexMatrix& resize (int r, int c, double val); |
1140 ComplexMatrix& resize (int r, int c, Complex val); | 1140 ComplexMatrix& resize (int r, int c, const Complex& val); |
1141 | 1141 |
1142 int operator == (const ComplexMatrix& a) const; | 1142 int operator == (const ComplexMatrix& a) const; |
1143 int operator != (const ComplexMatrix& a) const; | 1143 int operator != (const ComplexMatrix& a) const; |
1144 | 1144 |
1145 // destructive insert/delete/reorder operations | 1145 // destructive insert/delete/reorder operations |
1153 ComplexMatrix& insert (const ComplexRowVector& a, int r, int c); | 1153 ComplexMatrix& insert (const ComplexRowVector& a, int r, int c); |
1154 ComplexMatrix& insert (const ComplexColumnVector& a, int r, int c); | 1154 ComplexMatrix& insert (const ComplexColumnVector& a, int r, int c); |
1155 ComplexMatrix& insert (const ComplexDiagMatrix& a, int r, int c); | 1155 ComplexMatrix& insert (const ComplexDiagMatrix& a, int r, int c); |
1156 | 1156 |
1157 ComplexMatrix& fill (double val); | 1157 ComplexMatrix& fill (double val); |
1158 ComplexMatrix& fill (Complex val); | 1158 ComplexMatrix& fill (const Complex& val); |
1159 ComplexMatrix& fill (double val, int r1, int c1, int r2, int c2); | 1159 ComplexMatrix& fill (double val, int r1, int c1, int r2, int c2); |
1160 ComplexMatrix& fill (Complex val, int r1, int c1, int r2, int c2); | 1160 ComplexMatrix& fill (const Complex& val, int r1, int c1, int r2, int c2); |
1161 | 1161 |
1162 ComplexMatrix append (const Matrix& a) const; | 1162 ComplexMatrix append (const Matrix& a) const; |
1163 ComplexMatrix append (const RowVector& a) const; | 1163 ComplexMatrix append (const RowVector& a) const; |
1164 ComplexMatrix append (const ColumnVector& a) const; | 1164 ComplexMatrix append (const ColumnVector& a) const; |
1165 ComplexMatrix append (const DiagMatrix& a) const; | 1165 ComplexMatrix append (const DiagMatrix& a) const; |
1251 ComplexMatrix operator + (double s) const; | 1251 ComplexMatrix operator + (double s) const; |
1252 ComplexMatrix operator - (double s) const; | 1252 ComplexMatrix operator - (double s) const; |
1253 ComplexMatrix operator * (double s) const; | 1253 ComplexMatrix operator * (double s) const; |
1254 ComplexMatrix operator / (double s) const; | 1254 ComplexMatrix operator / (double s) const; |
1255 | 1255 |
1256 ComplexMatrix operator + (Complex s) const; | 1256 ComplexMatrix operator + (const Complex& s) const; |
1257 ComplexMatrix operator - (Complex s) const; | 1257 ComplexMatrix operator - (const Complex& s) const; |
1258 ComplexMatrix operator * (Complex s) const; | 1258 ComplexMatrix operator * (const Complex& s) const; |
1259 ComplexMatrix operator / (Complex s) const; | 1259 ComplexMatrix operator / (const Complex& s) const; |
1260 | 1260 |
1261 // scalar by matrix -> matrix operations | 1261 // scalar by matrix -> matrix operations |
1262 | 1262 |
1263 friend ComplexMatrix operator + (double s, const ComplexMatrix& a); | 1263 friend ComplexMatrix operator + (double s, const ComplexMatrix& a); |
1264 friend ComplexMatrix operator - (double s, const ComplexMatrix& a); | 1264 friend ComplexMatrix operator - (double s, const ComplexMatrix& a); |
1265 friend ComplexMatrix operator * (double s, const ComplexMatrix& a); | 1265 friend ComplexMatrix operator * (double s, const ComplexMatrix& a); |
1266 friend ComplexMatrix operator / (double s, const ComplexMatrix& a); | 1266 friend ComplexMatrix operator / (double s, const ComplexMatrix& a); |
1267 | 1267 |
1268 friend ComplexMatrix operator + (Complex s, const ComplexMatrix& a); | 1268 friend ComplexMatrix operator + (const Complex& s, const ComplexMatrix& a); |
1269 friend ComplexMatrix operator - (Complex s, const ComplexMatrix& a); | 1269 friend ComplexMatrix operator - (const Complex& s, const ComplexMatrix& a); |
1270 friend ComplexMatrix operator * (Complex s, const ComplexMatrix& a); | 1270 friend ComplexMatrix operator * (const Complex& s, const ComplexMatrix& a); |
1271 friend ComplexMatrix operator / (Complex s, const ComplexMatrix& a); | 1271 friend ComplexMatrix operator / (const Complex& s, const ComplexMatrix& a); |
1272 | 1272 |
1273 // matrix by column vector -> column vector operations | 1273 // matrix by column vector -> column vector operations |
1274 | 1274 |
1275 ComplexColumnVector operator * (const ColumnVector& a) const; | 1275 ComplexColumnVector operator * (const ColumnVector& a) const; |
1276 | 1276 |
1419 | 1419 |
1420 public: | 1420 public: |
1421 ComplexColumnVector (void); | 1421 ComplexColumnVector (void); |
1422 ComplexColumnVector (int n); | 1422 ComplexColumnVector (int n); |
1423 ComplexColumnVector (int n, double val); | 1423 ComplexColumnVector (int n, double val); |
1424 ComplexColumnVector (int n, Complex val); | 1424 ComplexColumnVector (int n, const Complex& val); |
1425 ComplexColumnVector (const ColumnVector& a); | 1425 ComplexColumnVector (const ColumnVector& a); |
1426 ComplexColumnVector (const ComplexColumnVector& a); | 1426 ComplexColumnVector (const ComplexColumnVector& a); |
1427 ComplexColumnVector (double a); | 1427 ComplexColumnVector (double a); |
1428 ComplexColumnVector (Complex a); | 1428 ComplexColumnVector (const Complex& a); |
1429 ~ComplexColumnVector (void); | 1429 ~ComplexColumnVector (void); |
1430 | 1430 |
1431 ComplexColumnVector& operator = (const ColumnVector& a); | 1431 ComplexColumnVector& operator = (const ColumnVector& a); |
1432 ComplexColumnVector& operator = (const ComplexColumnVector& a); | 1432 ComplexColumnVector& operator = (const ComplexColumnVector& a); |
1433 | 1433 |
1442 Complex checkelem (int n) const; | 1442 Complex checkelem (int n) const; |
1443 Complex operator () (int n) const; | 1443 Complex operator () (int n) const; |
1444 | 1444 |
1445 ComplexColumnVector& resize (int n); | 1445 ComplexColumnVector& resize (int n); |
1446 ComplexColumnVector& resize (int n, double val); | 1446 ComplexColumnVector& resize (int n, double val); |
1447 ComplexColumnVector& resize (int n, Complex val); | 1447 ComplexColumnVector& resize (int n, const Complex& val); |
1448 | 1448 |
1449 int operator == (const ComplexColumnVector& a) const; | 1449 int operator == (const ComplexColumnVector& a) const; |
1450 int operator != (const ComplexColumnVector& a) const; | 1450 int operator != (const ComplexColumnVector& a) const; |
1451 | 1451 |
1452 // destructive insert/delete/reorder operations | 1452 // destructive insert/delete/reorder operations |
1453 | 1453 |
1454 ComplexColumnVector& insert (const ColumnVector& a, int r); | 1454 ComplexColumnVector& insert (const ColumnVector& a, int r); |
1455 ComplexColumnVector& insert (const ComplexColumnVector& a, int r); | 1455 ComplexColumnVector& insert (const ComplexColumnVector& a, int r); |
1456 | 1456 |
1457 ComplexColumnVector& fill (double val); | 1457 ComplexColumnVector& fill (double val); |
1458 ComplexColumnVector& fill (Complex val); | 1458 ComplexColumnVector& fill (const Complex& val); |
1459 ComplexColumnVector& fill (double val, int r1, int r2); | 1459 ComplexColumnVector& fill (double val, int r1, int r2); |
1460 ComplexColumnVector& fill (Complex val, int r1, int r2); | 1460 ComplexColumnVector& fill (const Complex& val, int r1, int r2); |
1461 | 1461 |
1462 ComplexColumnVector stack (const ColumnVector& a) const; | 1462 ComplexColumnVector stack (const ColumnVector& a) const; |
1463 ComplexColumnVector stack (const ComplexColumnVector& a) const; | 1463 ComplexColumnVector stack (const ComplexColumnVector& a) const; |
1464 | 1464 |
1465 ComplexRowVector hermitian (void) const; // complex conjugate transpose. | 1465 ComplexRowVector hermitian (void) const; // complex conjugate transpose. |
1478 ComplexColumnVector operator + (double s) const; | 1478 ComplexColumnVector operator + (double s) const; |
1479 ComplexColumnVector operator - (double s) const; | 1479 ComplexColumnVector operator - (double s) const; |
1480 ComplexColumnVector operator * (double s) const; | 1480 ComplexColumnVector operator * (double s) const; |
1481 ComplexColumnVector operator / (double s) const; | 1481 ComplexColumnVector operator / (double s) const; |
1482 | 1482 |
1483 ComplexColumnVector operator + (Complex s) const; | 1483 ComplexColumnVector operator + (const Complex& s) const; |
1484 ComplexColumnVector operator - (Complex s) const; | 1484 ComplexColumnVector operator - (const Complex& s) const; |
1485 ComplexColumnVector operator * (Complex s) const; | 1485 ComplexColumnVector operator * (const Complex& s) const; |
1486 ComplexColumnVector operator / (Complex s) const; | 1486 ComplexColumnVector operator / (const Complex& s) const; |
1487 | 1487 |
1488 // scalar by column vector -> column vector operations | 1488 // scalar by column vector -> column vector operations |
1489 | 1489 |
1490 friend ComplexColumnVector operator + (double s, | 1490 friend ComplexColumnVector operator + (double s, |
1491 const ComplexColumnVector& a); | 1491 const ComplexColumnVector& a); |
1494 friend ComplexColumnVector operator * (double s, | 1494 friend ComplexColumnVector operator * (double s, |
1495 const ComplexColumnVector& a); | 1495 const ComplexColumnVector& a); |
1496 friend ComplexColumnVector operator / (double s, | 1496 friend ComplexColumnVector operator / (double s, |
1497 const ComplexColumnVector& a); | 1497 const ComplexColumnVector& a); |
1498 | 1498 |
1499 friend ComplexColumnVector operator + (Complex s, | 1499 friend ComplexColumnVector operator + (const Complex& s, |
1500 const ComplexColumnVector& a); | 1500 const ComplexColumnVector& a); |
1501 friend ComplexColumnVector operator - (Complex s, | 1501 friend ComplexColumnVector operator - (const Complex& s, |
1502 const ComplexColumnVector& a); | 1502 const ComplexColumnVector& a); |
1503 friend ComplexColumnVector operator * (Complex s, | 1503 friend ComplexColumnVector operator * (const Complex& s, |
1504 const ComplexColumnVector& a); | 1504 const ComplexColumnVector& a); |
1505 friend ComplexColumnVector operator / (Complex s, | 1505 friend ComplexColumnVector operator / (const Complex& s, |
1506 const ComplexColumnVector& a); | 1506 const ComplexColumnVector& a); |
1507 | 1507 |
1508 // column vector by row vector -> matrix operations | 1508 // column vector by row vector -> matrix operations |
1509 | 1509 |
1510 ComplexMatrix operator * (const RowVector& a) const; | 1510 ComplexMatrix operator * (const RowVector& a) const; |
1613 | 1613 |
1614 public: | 1614 public: |
1615 ComplexRowVector (void); | 1615 ComplexRowVector (void); |
1616 ComplexRowVector (int n); | 1616 ComplexRowVector (int n); |
1617 ComplexRowVector (int n, double val); | 1617 ComplexRowVector (int n, double val); |
1618 ComplexRowVector (int n, Complex val); | 1618 ComplexRowVector (int n, const Complex& val); |
1619 ComplexRowVector (const RowVector& a); | 1619 ComplexRowVector (const RowVector& a); |
1620 ComplexRowVector (const ComplexRowVector& a); | 1620 ComplexRowVector (const ComplexRowVector& a); |
1621 ComplexRowVector (double a); | 1621 ComplexRowVector (double a); |
1622 ComplexRowVector (Complex a); | 1622 ComplexRowVector (const Complex& a); |
1623 ~ComplexRowVector (void); | 1623 ~ComplexRowVector (void); |
1624 | 1624 |
1625 ComplexRowVector& operator = (const RowVector& a); | 1625 ComplexRowVector& operator = (const RowVector& a); |
1626 ComplexRowVector& operator = (const ComplexRowVector& a); | 1626 ComplexRowVector& operator = (const ComplexRowVector& a); |
1627 | 1627 |
1636 Complex elem (int n) const; | 1636 Complex elem (int n) const; |
1637 Complex operator () (int n) const; | 1637 Complex operator () (int n) const; |
1638 | 1638 |
1639 ComplexRowVector& resize (int n); | 1639 ComplexRowVector& resize (int n); |
1640 ComplexRowVector& resize (int n, double val); | 1640 ComplexRowVector& resize (int n, double val); |
1641 ComplexRowVector& resize (int n, Complex val); | 1641 ComplexRowVector& resize (int n, const Complex& val); |
1642 | 1642 |
1643 int operator == (const ComplexRowVector& a) const; | 1643 int operator == (const ComplexRowVector& a) const; |
1644 int operator != (const ComplexRowVector& a) const; | 1644 int operator != (const ComplexRowVector& a) const; |
1645 | 1645 |
1646 // destructive insert/delete/reorder operations | 1646 // destructive insert/delete/reorder operations |
1647 | 1647 |
1648 ComplexRowVector& insert (const RowVector& a, int c); | 1648 ComplexRowVector& insert (const RowVector& a, int c); |
1649 ComplexRowVector& insert (const ComplexRowVector& a, int c); | 1649 ComplexRowVector& insert (const ComplexRowVector& a, int c); |
1650 | 1650 |
1651 ComplexRowVector& fill (double val); | 1651 ComplexRowVector& fill (double val); |
1652 ComplexRowVector& fill (Complex val); | 1652 ComplexRowVector& fill (const Complex& val); |
1653 ComplexRowVector& fill (double val, int c1, int c2); | 1653 ComplexRowVector& fill (double val, int c1, int c2); |
1654 ComplexRowVector& fill (Complex val, int c1, int c2); | 1654 ComplexRowVector& fill (const Complex& val, int c1, int c2); |
1655 | 1655 |
1656 ComplexRowVector append (const RowVector& a) const; | 1656 ComplexRowVector append (const RowVector& a) const; |
1657 ComplexRowVector append (const ComplexRowVector& a) const; | 1657 ComplexRowVector append (const ComplexRowVector& a) const; |
1658 | 1658 |
1659 ComplexColumnVector hermitian (void) const; // complex conjugate transpose. | 1659 ComplexColumnVector hermitian (void) const; // complex conjugate transpose. |
1672 ComplexRowVector operator + (double s) const; | 1672 ComplexRowVector operator + (double s) const; |
1673 ComplexRowVector operator - (double s) const; | 1673 ComplexRowVector operator - (double s) const; |
1674 ComplexRowVector operator * (double s) const; | 1674 ComplexRowVector operator * (double s) const; |
1675 ComplexRowVector operator / (double s) const; | 1675 ComplexRowVector operator / (double s) const; |
1676 | 1676 |
1677 ComplexRowVector operator + (Complex s) const; | 1677 ComplexRowVector operator + (const Complex& s) const; |
1678 ComplexRowVector operator - (Complex s) const; | 1678 ComplexRowVector operator - (const Complex& s) const; |
1679 ComplexRowVector operator * (Complex s) const; | 1679 ComplexRowVector operator * (const Complex& s) const; |
1680 ComplexRowVector operator / (Complex s) const; | 1680 ComplexRowVector operator / (const Complex& s) const; |
1681 | 1681 |
1682 // scalar by row vector -> row vector operations | 1682 // scalar by row vector -> row vector operations |
1683 | 1683 |
1684 friend ComplexRowVector operator + (double s, const ComplexRowVector& a); | 1684 friend ComplexRowVector operator + (double s, const ComplexRowVector& a); |
1685 friend ComplexRowVector operator - (double s, const ComplexRowVector& a); | 1685 friend ComplexRowVector operator - (double s, const ComplexRowVector& a); |
1686 friend ComplexRowVector operator * (double s, const ComplexRowVector& a); | 1686 friend ComplexRowVector operator * (double s, const ComplexRowVector& a); |
1687 friend ComplexRowVector operator / (double s, const ComplexRowVector& a); | 1687 friend ComplexRowVector operator / (double s, const ComplexRowVector& a); |
1688 | 1688 |
1689 friend ComplexRowVector operator + (Complex s, const ComplexRowVector& a); | 1689 friend ComplexRowVector operator + (const Complex& s, const |
1690 friend ComplexRowVector operator - (Complex s, const ComplexRowVector& a); | 1690 ComplexRowVector& a); |
1691 friend ComplexRowVector operator * (Complex s, const ComplexRowVector& a); | 1691 friend ComplexRowVector operator - (const Complex& s, const |
1692 friend ComplexRowVector operator / (Complex s, const ComplexRowVector& a); | 1692 ComplexRowVector& a); |
1693 friend ComplexRowVector operator * (const Complex& s, const | |
1694 ComplexRowVector& a); | |
1695 friend ComplexRowVector operator / (const Complex& s, const | |
1696 ComplexRowVector& a); | |
1693 | 1697 |
1694 // row vector by column vector -> scalar | 1698 // row vector by column vector -> scalar |
1695 | 1699 |
1696 Complex operator * (const ColumnVector& a) const; | 1700 Complex operator * (const ColumnVector& a) const; |
1697 | 1701 |
1802 | 1806 |
1803 public: | 1807 public: |
1804 ComplexDiagMatrix (void); | 1808 ComplexDiagMatrix (void); |
1805 ComplexDiagMatrix (int n); | 1809 ComplexDiagMatrix (int n); |
1806 ComplexDiagMatrix (int n, double val); | 1810 ComplexDiagMatrix (int n, double val); |
1807 ComplexDiagMatrix (int n, Complex val); | 1811 ComplexDiagMatrix (int n, const Complex& val); |
1808 ComplexDiagMatrix (int r, int c); | 1812 ComplexDiagMatrix (int r, int c); |
1809 ComplexDiagMatrix (int r, int c, double val); | 1813 ComplexDiagMatrix (int r, int c, double val); |
1810 ComplexDiagMatrix (int r, int c, Complex val); | 1814 ComplexDiagMatrix (int r, int c, const Complex& val); |
1811 ComplexDiagMatrix (const RowVector& a); | 1815 ComplexDiagMatrix (const RowVector& a); |
1812 ComplexDiagMatrix (const ComplexRowVector& a); | 1816 ComplexDiagMatrix (const ComplexRowVector& a); |
1813 ComplexDiagMatrix (const ColumnVector& a); | 1817 ComplexDiagMatrix (const ColumnVector& a); |
1814 ComplexDiagMatrix (const ComplexColumnVector& a); | 1818 ComplexDiagMatrix (const ComplexColumnVector& a); |
1815 ComplexDiagMatrix (const DiagMatrix& a); | 1819 ComplexDiagMatrix (const DiagMatrix& a); |
1816 ComplexDiagMatrix (const ComplexDiagMatrix& a); | 1820 ComplexDiagMatrix (const ComplexDiagMatrix& a); |
1817 ComplexDiagMatrix (double a); | 1821 ComplexDiagMatrix (double a); |
1818 ComplexDiagMatrix (Complex a); | 1822 ComplexDiagMatrix (const Complex& a); |
1819 ~ComplexDiagMatrix (void); | 1823 ~ComplexDiagMatrix (void); |
1820 | 1824 |
1821 ComplexDiagMatrix& operator = (const DiagMatrix& a); | 1825 ComplexDiagMatrix& operator = (const DiagMatrix& a); |
1822 ComplexDiagMatrix& operator = (const ComplexDiagMatrix& a); | 1826 ComplexDiagMatrix& operator = (const ComplexDiagMatrix& a); |
1823 | 1827 |
1833 Complex elem (int r, int c) const; | 1837 Complex elem (int r, int c) const; |
1834 Complex operator () (int r, int c) const; | 1838 Complex operator () (int r, int c) const; |
1835 | 1839 |
1836 ComplexDiagMatrix& resize (int r, int c); | 1840 ComplexDiagMatrix& resize (int r, int c); |
1837 ComplexDiagMatrix& resize (int r, int c, double val); | 1841 ComplexDiagMatrix& resize (int r, int c, double val); |
1838 ComplexDiagMatrix& resize (int r, int c, Complex val); | 1842 ComplexDiagMatrix& resize (int r, int c, const Complex& val); |
1839 | 1843 |
1840 int operator == (const ComplexDiagMatrix& a) const; | 1844 int operator == (const ComplexDiagMatrix& a) const; |
1841 int operator != (const ComplexDiagMatrix& a) const; | 1845 int operator != (const ComplexDiagMatrix& a) const; |
1842 | 1846 |
1843 ComplexDiagMatrix& fill (double val); | 1847 ComplexDiagMatrix& fill (double val); |
1844 ComplexDiagMatrix& fill (Complex val); | 1848 ComplexDiagMatrix& fill (const Complex& val); |
1845 ComplexDiagMatrix& fill (double val, int beg, int end); | 1849 ComplexDiagMatrix& fill (double val, int beg, int end); |
1846 ComplexDiagMatrix& fill (Complex val, int beg, int end); | 1850 ComplexDiagMatrix& fill (const Complex& val, int beg, int end); |
1847 ComplexDiagMatrix& fill (const ColumnVector& a); | 1851 ComplexDiagMatrix& fill (const ColumnVector& a); |
1848 ComplexDiagMatrix& fill (const ComplexColumnVector& a); | 1852 ComplexDiagMatrix& fill (const ComplexColumnVector& a); |
1849 ComplexDiagMatrix& fill (const RowVector& a); | 1853 ComplexDiagMatrix& fill (const RowVector& a); |
1850 ComplexDiagMatrix& fill (const ComplexRowVector& a); | 1854 ComplexDiagMatrix& fill (const ComplexRowVector& a); |
1851 ComplexDiagMatrix& fill (const ColumnVector& a, int beg); | 1855 ComplexDiagMatrix& fill (const ColumnVector& a, int beg); |
1878 // diagonal matrix by scalar -> matrix operations | 1882 // diagonal matrix by scalar -> matrix operations |
1879 | 1883 |
1880 ComplexMatrix operator + (double s) const; | 1884 ComplexMatrix operator + (double s) const; |
1881 ComplexMatrix operator - (double s) const; | 1885 ComplexMatrix operator - (double s) const; |
1882 | 1886 |
1883 ComplexMatrix operator + (Complex s) const; | 1887 ComplexMatrix operator + (const Complex& s) const; |
1884 ComplexMatrix operator - (Complex s) const; | 1888 ComplexMatrix operator - (const Complex& s) const; |
1885 | 1889 |
1886 // diagonal matrix by scalar -> diagonal matrix operations | 1890 // diagonal matrix by scalar -> diagonal matrix operations |
1887 | 1891 |
1888 ComplexDiagMatrix operator * (double s) const; | 1892 ComplexDiagMatrix operator * (double s) const; |
1889 ComplexDiagMatrix operator / (double s) const; | 1893 ComplexDiagMatrix operator / (double s) const; |
1890 | 1894 |
1891 ComplexDiagMatrix operator * (Complex s) const; | 1895 ComplexDiagMatrix operator * (const Complex& s) const; |
1892 ComplexDiagMatrix operator / (Complex s) const; | 1896 ComplexDiagMatrix operator / (const Complex& s) const; |
1893 | 1897 |
1894 // scalar by diagonal matrix -> matrix operations | 1898 // scalar by diagonal matrix -> matrix operations |
1895 | 1899 |
1896 friend ComplexMatrix operator + (double s, const ComplexDiagMatrix& a); | 1900 friend ComplexMatrix operator + (double s, const ComplexDiagMatrix& a); |
1897 friend ComplexMatrix operator - (double s, const ComplexDiagMatrix& a); | 1901 friend ComplexMatrix operator - (double s, const ComplexDiagMatrix& a); |
1898 | 1902 |
1899 friend ComplexMatrix operator + (Complex s, const ComplexDiagMatrix& a); | 1903 friend ComplexMatrix operator + (const Complex& s, const |
1900 friend ComplexMatrix operator - (Complex s, const ComplexDiagMatrix& a); | 1904 ComplexDiagMatrix& a); |
1905 friend ComplexMatrix operator - (const Complex& s, const | |
1906 ComplexDiagMatrix& a); | |
1901 | 1907 |
1902 // scalar by diagonal matrix -> diagonal matrix operations | 1908 // scalar by diagonal matrix -> diagonal matrix operations |
1903 | 1909 |
1904 friend ComplexDiagMatrix operator * (double s, const ComplexDiagMatrix& a); | 1910 friend ComplexDiagMatrix operator * (double s, const ComplexDiagMatrix& a); |
1905 friend ComplexDiagMatrix operator / (double s, const ComplexDiagMatrix& a); | 1911 friend ComplexDiagMatrix operator / (double s, const ComplexDiagMatrix& a); |
1906 | 1912 |
1907 friend ComplexDiagMatrix operator * (Complex s, const ComplexDiagMatrix& a); | 1913 friend ComplexDiagMatrix operator * (const Complex& s, const |
1908 friend ComplexDiagMatrix operator / (Complex s, const ComplexDiagMatrix& a); | 1914 ComplexDiagMatrix& a); |
1915 friend ComplexDiagMatrix operator / (const Complex& s, const | |
1916 ComplexDiagMatrix& a); | |
1909 | 1917 |
1910 // diagonal matrix by column vector -> column vector operations | 1918 // diagonal matrix by column vector -> column vector operations |
1911 | 1919 |
1912 ComplexColumnVector operator * (const ColumnVector& a) const; | 1920 ComplexColumnVector operator * (const ColumnVector& a) const; |
1913 | 1921 |
2087 | 2095 |
2088 ComplexMatrix balanced_mat; | 2096 ComplexMatrix balanced_mat; |
2089 ComplexMatrix balancing_mat; | 2097 ComplexMatrix balancing_mat; |
2090 }; | 2098 }; |
2091 | 2099 |
2092 inline ComplexAEPBALANCE::ComplexAEPBALANCE (const ComplexMatrix& a, const char * balance_job) | 2100 inline ComplexAEPBALANCE::ComplexAEPBALANCE (const ComplexMatrix& a, |
2101 const char * balance_job) | |
2093 { | 2102 { |
2094 init(a,balance_job); | 2103 init(a,balance_job); |
2095 } | 2104 } |
2096 | 2105 |
2097 inline ComplexAEPBALANCE::ComplexAEPBALANCE (const ComplexAEPBALANCE& a) | 2106 inline ComplexAEPBALANCE::ComplexAEPBALANCE (const ComplexAEPBALANCE& a) |