comparison liboctave/CMatrix.cc @ 889:a962376eac74

[project @ 1994-11-08 02:21:29 by jwe]
author jwe
date Tue, 08 Nov 1994 02:22:18 +0000
parents 714fd17fca28
children 9e6bdfdfcf86
comparison
equal deleted inserted replaced
888:f514646473c7 889:a962376eac74
1527 int nc = cols (); 1527 int nc = cols ();
1528 if (nr != a.rows () || nc != a.cols ()) 1528 if (nr != a.rows () || nc != a.cols ())
1529 { 1529 {
1530 (*current_liboctave_error_handler) 1530 (*current_liboctave_error_handler)
1531 ("nonconformant matrix += operation attempted"); 1531 ("nonconformant matrix += operation attempted");
1532 return ComplexMatrix (); 1532 return *this;
1533 } 1533 }
1534 1534
1535 for (int i = 0; i < a.length (); i++) 1535 for (int i = 0; i < a.length (); i++)
1536 elem (i, i) += a.elem (i, i); 1536 elem (i, i) += a.elem (i, i);
1537 1537
1545 int nc = cols (); 1545 int nc = cols ();
1546 if (nr != a.rows () || nc != a.cols ()) 1546 if (nr != a.rows () || nc != a.cols ())
1547 { 1547 {
1548 (*current_liboctave_error_handler) 1548 (*current_liboctave_error_handler)
1549 ("nonconformant matrix -= operation attempted"); 1549 ("nonconformant matrix -= operation attempted");
1550 return ComplexMatrix (); 1550 return *this;
1551 } 1551 }
1552 1552
1553 for (int i = 0; i < a.length (); i++) 1553 for (int i = 0; i < a.length (); i++)
1554 elem (i, i) -= a.elem (i, i); 1554 elem (i, i) -= a.elem (i, i);
1555 1555
1563 int nc = cols (); 1563 int nc = cols ();
1564 if (nr != a.rows () || nc != a.cols ()) 1564 if (nr != a.rows () || nc != a.cols ())
1565 { 1565 {
1566 (*current_liboctave_error_handler) 1566 (*current_liboctave_error_handler)
1567 ("nonconformant matrix += operation attempted"); 1567 ("nonconformant matrix += operation attempted");
1568 return ComplexMatrix (); 1568 return *this;
1569 } 1569 }
1570 1570
1571 for (int i = 0; i < a.length (); i++) 1571 for (int i = 0; i < a.length (); i++)
1572 elem (i, i) += a.elem (i, i); 1572 elem (i, i) += a.elem (i, i);
1573 1573
1581 int nc = cols (); 1581 int nc = cols ();
1582 if (nr != a.rows () || nc != a.cols ()) 1582 if (nr != a.rows () || nc != a.cols ())
1583 { 1583 {
1584 (*current_liboctave_error_handler) 1584 (*current_liboctave_error_handler)
1585 ("nonconformant matrix -= operation attempted"); 1585 ("nonconformant matrix -= operation attempted");
1586 return ComplexMatrix (); 1586 return *this;
1587 } 1587 }
1588 1588
1589 for (int i = 0; i < a.length (); i++) 1589 for (int i = 0; i < a.length (); i++)
1590 elem (i, i) -= a.elem (i, i); 1590 elem (i, i) -= a.elem (i, i);
1591 1591