diff src/OPERATORS/op-m-cm.cc @ 9662:0d3b248f4ab6

further improve mixed real-complex division
author Jaroslav Hajek <highegg@gmail.com>
date Wed, 23 Sep 2009 11:10:52 +0200
parents 319e2ab9b8ae
children 7e5b4de5fbfe
line wrap: on
line diff
--- a/src/OPERATORS/op-m-cm.cc	Wed Sep 23 10:00:16 2009 +0200
+++ b/src/OPERATORS/op-m-cm.cc	Wed Sep 23 11:10:52 2009 +0200
@@ -79,6 +79,18 @@
   return ret;
 }
 
+DEFBINOP (trans_ldiv, matrix, complex_matrix)
+{
+  CAST_BINOP_ARGS (const octave_matrix&, const octave_complex_matrix&);
+  MatrixType typ = v1.matrix_type ();
+  
+  ComplexMatrix ret = xleftdiv (v1.matrix_value (), 
+                         v2.complex_matrix_value (), typ, blas_trans);
+
+  v1.matrix_type (typ);
+  return ret;
+}
+
 DEFNDCMPLXCMPOP_FN (lt, matrix, complex_matrix, array, complex_array, mx_el_lt)
 DEFNDCMPLXCMPOP_FN (le, matrix, complex_matrix, array, complex_array, mx_el_le)
 DEFNDCMPLXCMPOP_FN (eq, matrix, complex_matrix, array, complex_array, mx_el_eq)
@@ -130,6 +142,8 @@
   INSTALL_BINOP (op_el_ldiv, octave_matrix, octave_complex_matrix, el_ldiv);
   INSTALL_BINOP (op_el_and, octave_matrix, octave_complex_matrix, el_and);
   INSTALL_BINOP (op_el_or, octave_matrix, octave_complex_matrix, el_or);
+  INSTALL_BINOP (op_trans_ldiv, octave_matrix, octave_complex_matrix, trans_ldiv);
+  INSTALL_BINOP (op_herm_ldiv, octave_matrix, octave_complex_matrix, trans_ldiv);
 
   INSTALL_CATOP (octave_matrix, octave_complex_matrix, m_cm);