changeset 3766:df962bbf1788

[project @ 2001-01-29 14:33:07 by jwe]
author jwe
date Mon, 29 Jan 2001 14:33:08 +0000
parents e10451597802
children f0e7c832e0e2
files src/OPERATORS/op-cm-cs.cc src/OPERATORS/op-cm-m.cc src/OPERATORS/op-cm-s.cc src/OPERATORS/op-cs-cm.cc src/OPERATORS/op-cs-m.cc src/OPERATORS/op-m-cm.cc src/OPERATORS/op-m-cs.cc src/OPERATORS/op-m-m.cc src/OPERATORS/op-m-s.cc src/OPERATORS/op-s-cm.cc src/OPERATORS/op-s-m.cc
diffstat 11 files changed, 53 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/src/OPERATORS/op-cm-cs.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-cm-cs.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -59,7 +59,12 @@
 
 DEFBINOP (ldiv, complex_matrix, complex)
 {
-  BINOP_NONCONFORMANT ("operator \\");
+  CAST_BINOP_ARGS (const octave_complex_matrix&, const octave_complex&);
+
+  ComplexMatrix m1 = v1.complex_matrix_value ();
+  ComplexMatrix m2 = v2.complex_matrix_value ();
+
+  return octave_value (xleftdiv (m1, m2));
 }
 
 DEFBINOP_FN (lt, complex_matrix, complex, mx_el_lt)
--- a/src/OPERATORS/op-cm-m.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-cm-m.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -45,13 +45,7 @@
 DEFBINOP_OP (add, complex_matrix, matrix, +)
 DEFBINOP_OP (sub, complex_matrix, matrix, -)
 DEFBINOP_OP (mul, complex_matrix, matrix, *)
-
-DEFBINOP (div, complex_matrix, matrix)
-{
-  CAST_BINOP_ARGS (const octave_complex_matrix&, const octave_matrix&);
-
-  return xdiv (v1.complex_matrix_value (), v2.matrix_value ());
-}
+DEFBINOP_FN (div, complex_matrix, matrix, xdiv)
 
 DEFBINOPX (pow, complex_matrix, matrix)
 {
--- a/src/OPERATORS/op-cm-s.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-cm-s.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -33,6 +33,7 @@
 #include "gripes.h"
 #include "ov.h"
 #include "ov-cx-mat.h"
+#include "ov-re-mat.h"
 #include "ov-scalar.h"
 #include "ov-typeinfo.h"
 #include "ops.h"
@@ -61,7 +62,12 @@
 
 DEFBINOP (ldiv, complex_matrix, scalar)
 {
-  BINOP_NONCONFORMANT ("operator \\");
+  CAST_BINOP_ARGS (const octave_complex_matrix&, const octave_scalar&);
+
+  ComplexMatrix m1 = v1.complex_matrix_value ();
+  Matrix m2 = v2.matrix_value ();
+
+  return octave_value (xleftdiv (m1, m2));
 }
 
 DEFBINOP_FN (lt, complex_matrix, scalar, mx_el_lt)
--- a/src/OPERATORS/op-cs-cm.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-cs-cm.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -45,7 +45,12 @@
 
 DEFBINOP (div, complex, complex_matrix)
 {
-  BINOP_NONCONFORMANT ("operator /");
+  CAST_BINOP_ARGS (const octave_complex&, const octave_complex_matrix&);
+
+  ComplexMatrix m1 = v1.complex_matrix_value ();
+  ComplexMatrix m2 = v2.complex_matrix_value ();
+
+  return octave_value (xdiv (m1, m2));
 }
 
 DEFBINOP_FN (pow, complex, complex_matrix, xpow)
--- a/src/OPERATORS/op-cs-m.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-cs-m.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -49,7 +49,12 @@
 
 DEFBINOP (div, complex, matrix)
 {
-  BINOP_NONCONFORMANT ("operator /");
+  CAST_BINOP_ARGS (const octave_complex&, const octave_matrix&);
+
+  ComplexMatrix m1 = v1.complex_matrix_value ();
+  Matrix m2 = v2.matrix_value ();
+
+  return octave_value (xdiv (m1, m2));
 }
 
 DEFBINOP_FN (pow, complex, matrix, xpow)
--- a/src/OPERATORS/op-m-cm.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-m-cm.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -45,13 +45,7 @@
 DEFBINOP_OP (add, matrix, complex_matrix, +)
 DEFBINOP_OP (sub, matrix, complex_matrix, -)
 DEFBINOP_OP (mul, matrix, complex_matrix, *)
-
-DEFBINOP (div, matrix, complex_matrix)
-{
-  CAST_BINOP_ARGS (const octave_matrix&, const octave_complex_matrix&);
-
-  return xdiv (v1.matrix_value (), v2.complex_matrix_value ());
-}
+DEFBINOP_FN (div, matrix, complex_matrix, xdiv)
 
 DEFBINOPX (pow, matrix, complex_matrix)
 {
--- a/src/OPERATORS/op-m-cs.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-m-cs.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -63,7 +63,12 @@
 
 DEFBINOP (ldiv, matrix, complex)
 {
-  BINOP_NONCONFORMANT ("operator \\");
+  CAST_BINOP_ARGS (const octave_matrix&, const octave_complex&);
+
+  Matrix m1 = v1.matrix_value ();
+  ComplexMatrix m2 = v2.complex_matrix_value ();
+
+  return octave_value (xleftdiv (m1, m2));
 }
 
 DEFBINOP_FN (lt, matrix, complex, mx_el_lt)
--- a/src/OPERATORS/op-m-m.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-m-m.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -56,13 +56,7 @@
 DEFBINOP_OP (add, matrix, matrix, +)
 DEFBINOP_OP (sub, matrix, matrix, -)
 DEFBINOP_OP (mul, matrix, matrix, *)
-
-DEFBINOP (div, matrix, matrix)
-{
-  CAST_BINOP_ARGS (const octave_matrix&, const octave_matrix&);
-
-  return xdiv (v1.matrix_value (), v2.matrix_value ());
-}
+DEFBINOP_FN (div, matrix, matrix, xdiv)
 
 DEFBINOPX (pow, matrix, matrix)
 {
--- a/src/OPERATORS/op-m-s.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-m-s.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -59,7 +59,12 @@
 
 DEFBINOP (ldiv, matrix, scalar)
 {
-  BINOP_NONCONFORMANT ("operator \\");
+  CAST_BINOP_ARGS (const octave_matrix&, const octave_scalar&);
+
+  Matrix m1 = v1.matrix_value ();
+  Matrix m2 = v2.matrix_value ();
+
+  return octave_value (xleftdiv (m1, m2));
 }
 
 DEFBINOP_FN (lt, matrix, scalar, mx_el_lt)
--- a/src/OPERATORS/op-s-cm.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-s-cm.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -35,6 +35,7 @@
 #include "ov.h"
 #include "ov-scalar.h"
 #include "ov-cx-mat.h"
+#include "ov-re-mat.h"
 #include "ov-typeinfo.h"
 #include "ops.h"
 #include "xdiv.h"
@@ -48,7 +49,12 @@
 
 DEFBINOP (div, scalar, complex_matrix)
 {
-  BINOP_NONCONFORMANT ("operator /");
+  CAST_BINOP_ARGS (const octave_scalar&, const octave_complex_matrix&);
+
+  Matrix m1 = v1.matrix_value ();
+  ComplexMatrix m2 = v2.complex_matrix_value ();
+
+  return octave_value (xdiv (m1, m2));
 }
 
 DEFBINOP_FN (pow, scalar, complex_matrix, xpow)
--- a/src/OPERATORS/op-s-m.cc	Wed Jan 17 18:41:30 2001 +0000
+++ b/src/OPERATORS/op-s-m.cc	Mon Jan 29 14:33:08 2001 +0000
@@ -45,7 +45,12 @@
 
 DEFBINOP (div, scalar, matrix)
 {
-  BINOP_NONCONFORMANT ("operator /");
+  CAST_BINOP_ARGS (const octave_scalar&, const octave_matrix&);
+
+  Matrix m1 = v1.matrix_value ();
+  Matrix m2 = v2.matrix_value ();
+
+  return octave_value (xdiv (m1, m2));
 }
 
 DEFBINOP_FN (pow, scalar, matrix, xpow)