diff liboctave/dim-vector.h @ 4655:c8829691db47

[project @ 2003-11-24 21:24:37 by jwe]
author jwe
date Mon, 24 Nov 2003 21:24:37 +0000
parents f2cd320cbf6e
children 6639c2574023
line wrap: on
line diff
--- a/liboctave/dim-vector.h
+++ b/liboctave/dim-vector.h
@@ -266,6 +266,12 @@
     return retval;
   }
 
+  bool
+  all_ones (void) const
+  {
+    return (num_ones () == length ());
+  }
+
   // This is the number of elements that a matrix with this dimension
   // vector would have, NOT the number of dimensions (elements in the
   // dimension vector).