GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ov-bool-mat.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1996-2017 John W. Eaton
4 Copyright (C) 2009-2010 VZLU Prague
5 
6 This file is part of Octave.
7 
8 Octave is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if defined (HAVE_CONFIG_H)
25 # include "config.h"
26 #endif
27 
28 #include <iostream>
29 #include <vector>
30 
31 #include "dNDArray.h"
32 #include "fNDArray.h"
33 #include "int8NDArray.h"
34 #include "int16NDArray.h"
35 #include "int32NDArray.h"
36 #include "int64NDArray.h"
37 #include "uint8NDArray.h"
38 #include "uint16NDArray.h"
39 #include "uint32NDArray.h"
40 #include "uint64NDArray.h"
41 
42 #include "lo-ieee.h"
43 #include "mx-base.h"
44 #include "oct-locbuf.h"
45 
46 #include "defun.h"
47 #include "errwarn.h"
48 #include "mxarray.h"
49 #include "ovl.h"
50 #include "oct-hdf5.h"
51 #include "ops.h"
52 #include "ov-base.h"
53 #include "ov-base-mat.h"
54 #include "ov-base-mat.cc"
55 #include "ov-bool.h"
56 #include "ov-bool-mat.h"
57 #include "ov-re-mat.h"
58 #include "pr-output.h"
59 
60 #include "byte-swap.h"
61 #include "ls-oct-text.h"
62 #include "ls-hdf5.h"
63 #include "ls-utils.h"
64 
65 template class octave_base_matrix<boolNDArray>;
66 
68  "bool matrix", "logical");
69 
70 static octave_base_value *
72 {
73  const octave_bool_matrix& v = dynamic_cast<const octave_bool_matrix&> (a);
74 
75  return new octave_matrix (NDArray (v.bool_array_value ()));
76 }
77 
80 {
83 }
84 
87 {
89 
90  if (matrix.ndims () == 2)
91  {
92  boolMatrix bm (matrix);
93 
94  octave_idx_type nr = bm.rows ();
95  octave_idx_type nc = bm.cols ();
96 
97  if (nr == 1 && nc == 1)
98  retval = new octave_bool (bm (0, 0));
99  }
100 
101  return retval;
102 }
103 
104 double
106 {
107  if (rows () == 0 || columns () == 0)
108  err_invalid_conversion ("bool matrix", "real scalar");
109 
110  warn_implicit_conversion ("Octave:array-to-scalar",
111  "bool matrix", "real scalar");
112 
113  return matrix(0, 0);
114 }
115 
116 float
118 {
119  if (rows () == 0 || columns () == 0)
120  err_invalid_conversion ("bool matrix", "real scalar");
121 
122  warn_implicit_conversion ("Octave:array-to-scalar",
123  "bool matrix", "real scalar");
124 
125  return matrix(0, 0);
126 }
127 
128 Complex
130 {
131  if (rows () == 0 || columns () == 0)
132  err_invalid_conversion ("bool matrix", "complex scalar");
133 
134  warn_implicit_conversion ("Octave:array-to-scalar",
135  "bool matrix", "complex scalar");
136 
137  return Complex (matrix(0, 0), 0);
138 }
139 
142 {
143  float tmp = lo_ieee_float_nan_value ();
144 
145  FloatComplex retval (tmp, tmp);
146 
147  if (rows () == 0 || columns () == 0)
148  err_invalid_conversion ("bool matrix", "complex scalar");
149 
150  warn_implicit_conversion ("Octave:array-to-scalar",
151  "bool matrix", "complex scalar");
152 
153  retval = matrix(0, 0);
154 
155  return retval;
156 }
157 
160  char type) const
161 {
163  return tmp.convert_to_str (pad, force, type);
164 }
165 
168 {
169  return NDArray (matrix);
170 }
171 
174 {
175  return FloatNDArray (matrix);
176 }
177 
180 {
181  return int8NDArray (matrix);
182 }
183 
186 {
187  return int16NDArray (matrix);
188 }
189 
192 {
193  return int32NDArray (matrix);
194 }
195 
198 {
199  return int64NDArray (matrix);
200 }
201 
204 {
205  return uint8NDArray (matrix);
206 }
207 
210 {
211  return uint16NDArray (matrix);
212 }
213 
216 {
217  return uint32NDArray (matrix);
218 }
219 
222 {
223  return uint64NDArray (matrix);
224 }
225 
226 void
228  bool pr_as_read_syntax) const
229 {
230  octave_print_internal (os, matrix, pr_as_read_syntax,
232 }
233 
234 bool
236 {
237  dim_vector dv = dims ();
238  if (dv.ndims () > 2)
239  {
240  NDArray tmp = array_value ();
241  os << "# ndims: " << dv.ndims () << "\n";
242 
243  for (int i = 0; i < dv.ndims (); i++)
244  os << " " << dv(i);
245 
246  os << "\n" << tmp;
247  }
248  else
249  {
250  // Keep this case, rather than use generic code above for backward
251  // compatibility. Makes load_ascii much more complex!!
252  os << "# rows: " << rows () << "\n"
253  << "# columns: " << columns () << "\n";
254 
255  Matrix tmp = matrix_value ();
256 
257  os << tmp;
258  }
259 
260  return true;
261 }
262 
263 bool
265 {
267 
268  keywords[0] = "ndims";
269  keywords[1] = "rows";
270 
271  std::string kw;
272  octave_idx_type val = 0;
273 
274  if (! extract_keyword (is, keywords, kw, val, true))
275  error ("load: failed to extract number of rows and columns");
276 
277  if (kw == "ndims")
278  {
279  int mdims = static_cast<int> (val);
280 
281  if (mdims < 0)
282  error ("load: failed to extract number of dimensions");
283 
284  dim_vector dv;
285  dv.resize (mdims);
286 
287  for (int i = 0; i < mdims; i++)
288  is >> dv(i);
289 
290  if (! is)
291  error ("load: failed to extract dimensions");
292 
293  boolNDArray btmp (dv);
294 
295  if (btmp.is_empty ())
296  matrix = btmp;
297  else
298  {
299  NDArray tmp(dv);
300  is >> tmp;
301 
302  if (! is)
303  error ("load: failed to load matrix constant");
304 
305  for (octave_idx_type i = 0; i < btmp.numel (); i++)
306  btmp.elem (i) = (tmp.elem (i) != 0.);
307 
308  matrix = btmp;
309  }
310  }
311  else if (kw == "rows")
312  {
313  octave_idx_type nr = val;
314  octave_idx_type nc = 0;
315 
316  if (nr < 0 || ! extract_keyword (is, "columns", nc) || nc < 0)
317  error ("load: failed to extract number of rows and columns");
318 
319  if (nr > 0 && nc > 0)
320  {
321  Matrix tmp (nr, nc);
322  is >> tmp;
323  if (! is)
324  error ("load: failed to load matrix constant");
325 
326  boolMatrix btmp (nr, nc);
327  for (octave_idx_type j = 0; j < nc; j++)
328  for (octave_idx_type i = 0; i < nr; i++)
329  btmp.elem (i,j) = (tmp.elem (i, j) != 0.);
330 
331  matrix = btmp;
332  }
333  else if (nr == 0 || nc == 0)
334  matrix = boolMatrix (nr, nc);
335  else
336  panic_impossible ();
337  }
338  else
339  panic_impossible ();
340 
341  return true;
342 }
343 
344 bool
345 octave_bool_matrix::save_binary (std::ostream& os, bool& /* save_as_floats */)
346 {
347 
348  dim_vector dv = dims ();
349  if (dv.ndims () < 1)
350  return false;
351 
352  // Use negative value for ndims to differentiate with old format!!
353  int32_t tmp = - dv.ndims ();
354  os.write (reinterpret_cast<char *> (&tmp), 4);
355  for (int i = 0; i < dv.ndims (); i++)
356  {
357  tmp = dv(i);
358  os.write (reinterpret_cast<char *> (&tmp), 4);
359  }
360 
362  bool *mtmp = m.fortran_vec ();
363  octave_idx_type nel = m.numel ();
364  OCTAVE_LOCAL_BUFFER (char, htmp, nel);
365 
366  for (octave_idx_type i = 0; i < nel; i++)
367  htmp[i] = (mtmp[i] ? 1 : 0);
368 
369  os.write (htmp, nel);
370 
371  return true;
372 }
373 
374 bool
377 {
378  int32_t mdims;
379  if (! is.read (reinterpret_cast<char *> (&mdims), 4))
380  return false;
381  if (swap)
382  swap_bytes<4> (&mdims);
383  if (mdims >= 0)
384  return false;
385 
386  // mdims is negative for consistency with other matrices, where it is
387  // negative to allow the positive value to be used for rows/cols for
388  // backward compatibility
389  mdims = - mdims;
390  int32_t di;
391  dim_vector dv;
392  dv.resize (mdims);
393 
394  for (int i = 0; i < mdims; i++)
395  {
396  if (! is.read (reinterpret_cast<char *> (&di), 4))
397  return false;
398  if (swap)
399  swap_bytes<4> (&di);
400  dv(i) = di;
401  }
402 
403  // Convert an array with a single dimension to be a row vector.
404  // Octave should never write files like this, other software
405  // might.
406 
407  if (mdims == 1)
408  {
409  mdims = 2;
410  dv.resize (mdims);
411  dv(1) = dv(0);
412  dv(0) = 1;
413  }
414 
415  octave_idx_type nel = dv.numel ();
416  OCTAVE_LOCAL_BUFFER (char, htmp, nel);
417  if (! is.read (htmp, nel))
418  return false;
419  boolNDArray m(dv);
420  bool *mtmp = m.fortran_vec ();
421  for (octave_idx_type i = 0; i < nel; i++)
422  mtmp[i] = (htmp[i] ? 1 : 0);
423  matrix = m;
424 
425  return true;
426 }
427 
428 bool
430  bool /* save_as_floats */)
431 {
432  bool retval = true;
433 
434 #if defined (HAVE_HDF5)
435 
436  dim_vector dv = dims ();
437  int empty = save_hdf5_empty (loc_id, name, dv);
438  if (empty)
439  return (empty > 0);
440 
441  int rank = dv.ndims ();
442  hid_t space_hid, data_hid;
443  space_hid = data_hid = -1;
445 
446  OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
447 
448  // Octave uses column-major, while HDF5 uses row-major ordering
449  for (int i = 0; i < rank; i++)
450  hdims[i] = dv(rank-i-1);
451 
452  space_hid = H5Screate_simple (rank, hdims, 0);
453  if (space_hid < 0) return false;
454 #if defined (HAVE_HDF5_18)
455  data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_HBOOL, space_hid,
457 #else
458  data_hid = H5Dcreate (loc_id, name, H5T_NATIVE_HBOOL, space_hid,
460 #endif
461  if (data_hid < 0)
462  {
463  H5Sclose (space_hid);
464  return false;
465  }
466 
467  octave_idx_type nel = m.numel ();
468  bool *mtmp = m.fortran_vec ();
469  OCTAVE_LOCAL_BUFFER (hbool_t, htmp, nel);
470 
471  for (octave_idx_type i = 0; i < nel; i++)
472  htmp[i] = mtmp[i];
473 
474  retval = H5Dwrite (data_hid, H5T_NATIVE_HBOOL, octave_H5S_ALL, octave_H5S_ALL,
475  octave_H5P_DEFAULT, htmp) >= 0;
476 
477  H5Dclose (data_hid);
478  H5Sclose (space_hid);
479 
480 #else
481  octave_unused_parameter (loc_id);
482  octave_unused_parameter (name);
483 
484  warn_save ("hdf5");
485 #endif
486 
487  return retval;
488 }
489 
490 bool
492 {
493  bool retval = false;
494 
495 #if defined (HAVE_HDF5)
496 
497  dim_vector dv;
498  int empty = load_hdf5_empty (loc_id, name, dv);
499  if (empty > 0)
500  matrix.resize (dv);
501  if (empty)
502  return (empty > 0);
503 
504 #if defined (HAVE_HDF5_18)
505  hid_t data_hid = H5Dopen (loc_id, name, octave_H5P_DEFAULT);
506 #else
507  hid_t data_hid = H5Dopen (loc_id, name);
508 #endif
509  hid_t space_id = H5Dget_space (data_hid);
510 
511  hsize_t rank = H5Sget_simple_extent_ndims (space_id);
512 
513  if (rank < 1)
514  {
515  H5Dclose (data_hid);
516  return false;
517  }
518 
519  OCTAVE_LOCAL_BUFFER (hsize_t, hdims, rank);
520  OCTAVE_LOCAL_BUFFER (hsize_t, maxdims, rank);
521 
522  H5Sget_simple_extent_dims (space_id, hdims, maxdims);
523 
524  // Octave uses column-major, while HDF5 uses row-major ordering
525  if (rank == 1)
526  {
527  dv.resize (2);
528  dv(0) = 1;
529  dv(1) = hdims[0];
530  }
531  else
532  {
533  dv.resize (rank);
534  for (hsize_t i = 0, j = rank - 1; i < rank; i++, j--)
535  dv(j) = hdims[i];
536  }
537 
538  octave_idx_type nel = dv.numel ();
539  OCTAVE_LOCAL_BUFFER (hbool_t, htmp, nel);
540  if (H5Dread (data_hid, H5T_NATIVE_HBOOL, octave_H5S_ALL, octave_H5S_ALL,
541  octave_H5P_DEFAULT, htmp)
542  >= 0)
543  {
544  retval = true;
545 
546  boolNDArray btmp (dv);
547  for (octave_idx_type i = 0; i < nel; i++)
548  btmp.elem (i) = htmp[i];
549 
550  matrix = btmp;
551  }
552 
553  H5Dclose (data_hid);
554 
555 #else
556  octave_unused_parameter (loc_id);
557  octave_unused_parameter (name);
558 
559  warn_load ("hdf5");
560 #endif
561 
562  return retval;
563 }
564 
565 mxArray *
567 {
569 
570  bool *pr = static_cast<bool *> (retval->get_data ());
571 
572  mwSize nel = numel ();
573 
574  const bool *p = matrix.data ();
575 
576  for (mwIndex i = 0; i < nel; i++)
577  pr[i] = p[i];
578 
579  return retval;
580 }
581 
582 DEFUN (logical, args, ,
583  doc: /* -*- texinfo -*-
584 @deftypefn {} {} logical (@var{x})
585 Convert the numeric object @var{x} to logical type.
586 
587 Any nonzero values will be converted to true (1) while zero values will be
588 converted to false (0). The non-numeric value NaN cannot be converted and
589 will produce an error.
590 
591 Compatibility Note: Octave accepts complex values as input, whereas
592 @sc{matlab} issues an error.
593 @seealso{double, single, char}
594 @end deftypefn */)
595 {
596  if (args.length () != 1)
597  print_usage ();
598 
600 
602 
603  if (arg.is_bool_type ())
604  retval = arg;
605  else if (arg.is_numeric_type ())
606  {
607  if (arg.is_sparse_type ())
608  retval = arg.sparse_bool_matrix_value ();
609  else if (arg.is_scalar_type ())
610  retval = arg.bool_value ();
611  else
612  retval = arg.bool_array_value ();
613  }
614  else
615  err_wrong_type_arg ("logical", arg);
616 
617  return retval;
618 }
619 
620 /*
621 %!test
622 %! m = eye (2) != 0;
623 %! s = ! 0;
624 %! c = {"double", "single", "int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "logical"};
625 %! for i = 1:numel (c)
626 %! assert (logical (eye (2, c{i})), m);
627 %! assert (logical (eye (1, c{i})), s);
628 %! endfor
629 */
octave_value as_uint32(void) const
Definition: ov-bool-mat.cc:215
bool is_empty(void) const
Definition: Array.h:575
octave_value convert_to_str_internal(bool pad, bool force, char type) const
Definition: ov-bool-mat.cc:159
static octave_base_value * default_numeric_conversion_function(const octave_base_value &a)
Definition: ov-bool-mat.cc:71
intNDArray< octave_int64 > int64NDArray
Definition: int64NDArray.h:33
else err_wrong_type_arg("logical", arg)
octave_idx_type columns(void) const
Definition: ov-base.h:319
octave_value as_int8(void) const
Definition: ov-bool-mat.cc:179
int ndims(void) const
Definition: Array.h:590
OCTINTERP_API void print_usage(void)
Definition: defun.cc:52
octave_idx_type numel(void) const
Number of elements in the array.
Definition: Array.h:363
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
const octave_hdf5_id octave_H5S_ALL
int save_hdf5_empty(octave_hdf5_id loc_id, const char *name, const dim_vector d)
Definition: ls-hdf5.cc:897
intNDArray< octave_uint32 > uint32NDArray
Definition: uint32NDArray.h:33
bool is_scalar_type(void) const
Definition: ov.h:673
intNDArray< octave_uint8 > uint8NDArray
Definition: uint8NDArray.h:33
bool is_numeric_type(void) const
Definition: ov.h:679
intNDArray< octave_uint16 > uint16NDArray
Definition: uint16NDArray.h:33
octave_idx_type numel(void) const
Definition: ov-base-mat.h:112
void resize(int n, int fill_value=0)
Definition: dim-vector.h:316
#define DEFUN(name, args_name, nargout_name, doc)
Definition: defun.h:46
void error(const char *fmt,...)
Definition: error.cc:570
void * get_data(void) const
Definition: mxarray.h:449
octave_value as_int16(void) const
Definition: ov-bool-mat.cc:185
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
Definition: ov-base.h:169
int load_hdf5_empty(octave_hdf5_id loc_id, const char *name, dim_vector &d)
Definition: ls-hdf5.cc:953
T & elem(octave_idx_type n)
Definition: Array.h:482
intNDArray< octave_int16 > int16NDArray
Definition: int16NDArray.h:33
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
Definition: ov-bool-mat.cc:375
Complex complex_value(bool=false) const
Definition: ov-bool-mat.cc:129
boolNDArray bool_array_value(bool warn=false) const
Definition: ov.h:825
octave_idx_type rows(void) const
Definition: Array.h:401
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
Definition: dim-vector.h:389
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:398
bool swap
Definition: load-save.cc:725
JNIEnv void * args
Definition: ov-java.cc:67
octave_value as_int64(void) const
Definition: ov-bool-mat.cc:197
void warn_load(const char *type) const
Definition: ov-base.cc:1151
double double_value(bool=false) const
Definition: ov-bool-mat.cc:105
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
Definition: ov-bool-mat.cc:227
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are empty
Definition: ov-struct.cc:1688
OCTAVE_EXPORT octave_value_list any number nd example oindent prints the prompt xample Pick a any number!nd example oindent and waits for the user to enter a value The string entered by the user is evaluated as an so it may be a literal a variable name
Definition: input.cc:871
void swap_bytes< 4 >(void *ptr)
Definition: byte-swap.h:60
bool load_hdf5(octave_hdf5_id loc_id, const char *name)
Definition: ov-bool-mat.cc:491
intNDArray< octave_int8 > int8NDArray
Definition: int8NDArray.h:33
octave_value convert_to_str(bool pad=false, bool force=false, char type= '\'') const
Definition: ov.h:1202
bool is_sparse_type(void) const
Definition: ov.h:682
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
Definition: ls-oct-text.cc:80
bool is_bool_type(void) const
Definition: ov.h:661
octave_value as_uint16(void) const
Definition: ov-bool-mat.cc:209
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
octave_value as_int32(void) const
Definition: ov-bool-mat.cc:191
static int static_type_id(void)
Definition: ov-re-mat.h:250
octave_value as_uint8(void) const
Definition: ov-bool-mat.cc:203
const T * data(void) const
Definition: Array.h:582
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
Definition: ov.h:841
bool save_binary(std::ostream &os, bool &save_as_floats)
Definition: ov-bool-mat.cc:345
void resize(const dim_vector &dv, const T &rfv)
Definition: Array.cc:1028
double tmp
Definition: data.cc:6300
#define panic_impossible()
Definition: error.h:40
int64_t octave_hdf5_id
octave_value as_single(void) const
Definition: ov-bool-mat.cc:173
issues an error eealso char nd deftypefn *octave_value retval
Definition: ov-bool-mat.cc:595
idx type
Definition: ov.cc:3129
Definition: dMatrix.h:37
float lo_ieee_float_nan_value(void)
Definition: lo-ieee.cc:202
void warn_save(const char *type) const
Definition: ov-base.cc:1160
void mxArray
Definition: mex.h:55
friend class octave_value
Definition: ov-base.h:211
octave_value as_double(void) const
Definition: ov-bool-mat.cc:167
bool save_ascii(std::ostream &os)
Definition: ov-bool-mat.cc:235
octave_value arg
Definition: ov-bool-mat.cc:601
dim_vector dims(void) const
Definition: ov-base-mat.h:110
intNDArray< octave_int32 > int32NDArray
Definition: int32NDArray.h:33
void err_invalid_conversion(const std::string &from, const std::string &to)
Definition: errwarn.cc:68
octave_value as_uint64(void) const
Definition: ov-bool-mat.cc:221
bool bool_value(bool warn=false) const
Definition: ov.h:819
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
octave_base_value * try_narrowing_conversion(void)
Definition: ov-bool-mat.cc:86
int current_print_indent_level(void) const
Definition: ov-base.h:830
p
Definition: lu.cc:138
type_conv_info numeric_conversion_function(void) const
Definition: ov-bool-mat.cc:79
NDArray array_value(bool=false) const
Definition: ov-bool-mat.h:144
mxArray * as_mxArray(void) const
Definition: ov-bool-mat.cc:566
FloatComplex float_complex_value(bool=false) const
Definition: ov-bool-mat.cc:141
void octave_print_internal(std::ostream &, char, bool)
Definition: pr-output.cc:1722
void warn_implicit_conversion(const char *id, const char *from, const char *to)
Definition: errwarn.cc:332
octave_idx_type ndims(void) const
Number of dimensions.
Definition: dim-vector.h:301
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
Definition: oct-locbuf.h:200
float float_value(bool=false) const
Definition: ov-bool-mat.cc:117
const octave_hdf5_id octave_H5P_DEFAULT
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
Definition: ov-bool-mat.cc:429
Definition: mxarray.h:76
std::complex< double > Complex
Definition: oct-cmplx.h:31
const T * fortran_vec(void) const
Definition: Array.h:584
octave_idx_type cols(void) const
Definition: Array.h:409
static const char *const keywords[]
Definition: help.cc:147
write the output to stdout if nargout is
Definition: load-save.cc:1576
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:854
dim_vector dv
Definition: sub2ind.cc:263
octave_idx_type rows(void) const
Definition: ov-base.h:312
Matrix matrix_value(bool=false) const
Definition: ov-bool-mat.h:138
boolNDArray bool_array_value(bool=false) const
Definition: ov-bool-mat.h:182
intNDArray< octave_uint64 > uint64NDArray
Definition: uint64NDArray.h:33
bool load_ascii(std::istream &is)
Definition: ov-bool-mat.cc:264