changeset 2964:0a2551ec7004

[project @ 1997-05-12 07:26:50 by jwe]
author jwe
date Mon, 12 May 1997 07:26:51 +0000
parents c0c280cda856
children a51926eab51a
files liboctave/CMatrix.cc liboctave/CMatrix.h liboctave/ChangeLog liboctave/dMatrix.cc liboctave/dMatrix.h
diffstat 5 files changed, 20 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/CMatrix.cc	Mon May 12 03:29:38 1997 +0000
+++ b/liboctave/CMatrix.cc	Mon May 12 07:26:51 1997 +0000
@@ -1908,10 +1908,19 @@
 
 // unary operations
 
-Matrix
+boolMatrix
 ComplexMatrix::operator ! (void) const
 {
-  return Matrix (not (data (), length ()), rows (), cols ());
+  int nr = rows ();
+  int nc = cols ();
+
+  boolMatrix b (nr, nc);
+
+  for (int j = 0; j < nc; j++)
+    for (int i = 0; i < nr; i++)
+      b.elem (i, j) = elem (i, j) != 0.0;
+
+  return b;
 }
 
 // other operations
--- a/liboctave/CMatrix.h	Mon May 12 03:29:38 1997 +0000
+++ b/liboctave/CMatrix.h	Mon May 12 07:26:51 1997 +0000
@@ -200,7 +200,7 @@
 
   // unary operations
 
-  Matrix operator ! (void) const;
+  boolMatrix operator ! (void) const;
 
   // other operations
 
--- a/liboctave/ChangeLog	Mon May 12 03:29:38 1997 +0000
+++ b/liboctave/ChangeLog	Mon May 12 07:26:51 1997 +0000
@@ -1,3 +1,8 @@
+Mon May 12 02:14:13 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* CMatrix.cc (ComplexMatrix::operator !): Return boolMatrix.
+	* dMatrix.cc (Matrix::operator !): Likewise
+
 Wed May  7 21:14:06 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* oct-syscalls.h, oct-syscalls.cc: New files.
--- a/liboctave/dMatrix.cc	Mon May 12 03:29:38 1997 +0000
+++ b/liboctave/dMatrix.cc	Mon May 12 07:26:51 1997 +0000
@@ -1517,13 +1517,13 @@
 
 // unary operations
 
-Matrix
+boolMatrix
 Matrix::operator ! (void) const
 {
   int nr = rows ();
   int nc = cols ();
 
-  Matrix b (nr, nc);
+  boolMatrix b (nr, nc);
 
   for (int j = 0; j < nc; j++)
     for (int i = 0; i < nr; i++)
--- a/liboctave/dMatrix.h	Mon May 12 03:29:38 1997 +0000
+++ b/liboctave/dMatrix.h	Mon May 12 07:26:51 1997 +0000
@@ -171,7 +171,7 @@
 
   // unary operations
 
-  Matrix operator ! (void) const;
+  boolMatrix operator ! (void) const;
 
   // column vector by row vector -> matrix operations