Mercurial > hg > octave-lyh
diff liboctave/CMatrix.cc @ 10363:a0728e81ed25
improve diag matrix interface & implementation
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 26 Feb 2010 11:44:38 +0100 |
parents | b47ab50a6aa8 |
children | 832732c2eb80 |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -892,8 +892,7 @@ ComplexMatrix conj (const ComplexMatrix& a) { - return ComplexMatrix (mx_inline_conj_dup (a.data (), a.length ()), - a.rows (), a.cols ()); + return do_mx_unary_map<Complex, Complex, std::conj> (a); } // resize is the destructive equivalent for this one @@ -3243,8 +3242,7 @@ Matrix ComplexMatrix::abs (void) const { - return Matrix (mx_inline_cabs_dup (data (), length ()), - rows (), cols ()); + return do_mx_unary_map<double, Complex, std::abs> (*this); } ComplexMatrix