comparison liboctave/CDiagMatrix.cc @ 9550:3d6a9aea2aea

refactor binary & bool ops in liboctave
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 19 Aug 2009 22:55:15 +0200
parents 0631d397fbe0
children a9b37bae1802
comparison
equal deleted inserted replaced
9549:ed34b1da0e26 9550:3d6a9aea2aea
48 ComplexDiagMatrix::operator == (const ComplexDiagMatrix& a) const 48 ComplexDiagMatrix::operator == (const ComplexDiagMatrix& a) const
49 { 49 {
50 if (rows () != a.rows () || cols () != a.cols ()) 50 if (rows () != a.rows () || cols () != a.cols ())
51 return 0; 51 return 0;
52 52
53 return mx_inline_equal (data (), a.data (), length ()); 53 return mx_inline_equal (length (), data (), a.data ());
54 } 54 }
55 55
56 bool 56 bool
57 ComplexDiagMatrix::operator != (const ComplexDiagMatrix& a) const 57 ComplexDiagMatrix::operator != (const ComplexDiagMatrix& a) const
58 { 58 {
443 if (r == 0 || c == 0) 443 if (r == 0 || c == 0)
444 return *this; 444 return *this;
445 445
446 Complex *d = fortran_vec (); // Ensures only one reference to my privates! 446 Complex *d = fortran_vec (); // Ensures only one reference to my privates!
447 447
448 mx_inline_add2 (d, a.data (), length ()); 448 mx_inline_add2 (length (), d, a.data ());
449 return *this; 449 return *this;
450 } 450 }
451 451
452 ComplexDiagMatrix 452 ComplexDiagMatrix
453 operator * (const ComplexDiagMatrix& a, const DiagMatrix& b) 453 operator * (const ComplexDiagMatrix& a, const DiagMatrix& b)