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-intx.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2004-2017 John W. Eaton
4 Copyright (C) 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 // FIXME: Do not uncomment these lines to have this file included only once.
25 // The build will break (2/6/2016).
26 // #if ! defined (octave_ov_intx_h)
27 // #define octave_ov_intx_h 1
28 
29 #include "octave-config.h"
30 
31 #include <cstdlib>
32 
33 #include <iosfwd>
34 #include <string>
35 
36 #include "mx-base.h"
37 #include "str-vec.h"
38 
39 #include "error.h"
40 #include "mxarray.h"
41 #include "oct-stream.h"
42 #include "ov-base.h"
43 #include "ov-base-int.h"
44 #include "ov-typeinfo.h"
45 #include "errwarn.h"
46 
47 #include "ov-re-mat.h"
48 #include "ov-scalar.h"
49 
50 class
54 {
55 public:
56 
59 
62 
65  (intNDArray<OCTAVE_INT_T> (nda)) { }
66 
68 
69  octave_base_value *clone (void) const
70  { return new OCTAVE_VALUE_INT_MATRIX_T (*this); }
71 
73  { return new OCTAVE_VALUE_INT_MATRIX_T (); }
74 
75  bool OCTAVE_TYPE_PREDICATE_FUNCTION (void) const { return true; }
76 
77  bool is_integer_type (void) const { return true; }
78 
79  builtin_type_t builtin_type (void) const { return OCTAVE_INT_BTYP; }
80 
81 public:
82 
84  int8_array_value (void) const { return int8NDArray (matrix); }
85 
87  int16_array_value (void) const { return int16NDArray (matrix); }
88 
90  int32_array_value (void) const { return int32NDArray (matrix); }
91 
93  int64_array_value (void) const { return int64NDArray (matrix); }
94 
96  uint8_array_value (void) const { return uint8NDArray (matrix); }
97 
99  uint16_array_value (void) const { return uint16NDArray (matrix); }
100 
102  uint32_array_value (void) const { return uint32NDArray (matrix); }
103 
105  uint64_array_value (void) const { return uint64NDArray (matrix); }
106 
107  double
108  double_value (bool = false) const
109  {
110  double retval = lo_ieee_nan_value ();
111 
112  if (is_empty ())
113  err_invalid_conversion (type_name (), "real scalar");
114 
115  warn_implicit_conversion ("Octave:array-to-scalar",
116  type_name (), "real scalar");
117 
118  retval = matrix(0).double_value ();
119 
120  return retval;
121  }
122 
123  float
124  float_value (bool = false) const
125  {
126  float retval = lo_ieee_float_nan_value ();
127 
128  if (is_empty ())
129  err_invalid_conversion (type_name (), "real scalar");
130 
131  warn_implicit_conversion ("Octave:array-to-scalar",
132  type_name (), "real scalar");
133 
134  retval = matrix(0).float_value ();
135 
136  return retval;
137  }
138 
139  double scalar_value (bool = false) const { return double_value (); }
140 
141  float float_scalar_value (bool = false) const { return float_value (); }
142 
143  Matrix
144  matrix_value (bool = false) const
145  {
146  Matrix retval;
147  dim_vector dv = dims ();
148  if (dv.ndims () > 2)
149  error ("invalid conversion of %s to Matrix", type_name ().c_str ());
150 
151  retval = Matrix (dv(0), dv(1));
152  double *vec = retval.fortran_vec ();
153  octave_idx_type nel = matrix.numel ();
154  for (octave_idx_type i = 0; i < nel; i++)
155  vec[i] = matrix(i).double_value ();
156 
157  return retval;
158  }
159 
161  float_matrix_value (bool = false) const
162  {
164  dim_vector dv = dims ();
165  if (dv.ndims () > 2)
166  error ("invalid conversion of %s to FloatMatrix", type_name ().c_str ());
167 
168  retval = FloatMatrix (dv(0), dv(1));
169  float *vec = retval.fortran_vec ();
170  octave_idx_type nel = matrix.numel ();
171  for (octave_idx_type i = 0; i < nel; i++)
172  vec[i] = matrix(i).float_value ();
173 
174  return retval;
175  }
176 
178  complex_matrix_value (bool = false) const
179  {
181  dim_vector dv = dims ();
182  if (dv.ndims () > 2)
183  error ("invalid conversion of %s to Matrix", type_name ().c_str ());
184 
185  retval = ComplexMatrix (dv(0), dv(1));
186  Complex *vec = retval.fortran_vec ();
187  octave_idx_type nel = matrix.numel ();
188  for (octave_idx_type i = 0; i < nel; i++)
189  vec[i] = Complex (matrix(i).double_value ());
190 
191  return retval;
192  }
193 
195  float_complex_matrix_value (bool = false) const
196  {
198  dim_vector dv = dims ();
199  if (dv.ndims () > 2)
200  error ("invalid conversion of %s to FloatMatrix", type_name ().c_str ());
201 
202  retval = FloatComplexMatrix (dv(0), dv(1));
203  FloatComplex *vec = retval.fortran_vec ();
204  octave_idx_type nel = matrix.numel ();
205  for (octave_idx_type i = 0; i < nel; i++)
206  vec[i] = FloatComplex (matrix(i).float_value ());
207 
208  return retval;
209  }
210 
211  NDArray
212  array_value (bool = false) const
213  {
214  NDArray retval (matrix.dims ());
215  double *vec = retval.fortran_vec ();
216  octave_idx_type nel = matrix.numel ();
217  for (octave_idx_type i = 0; i < nel; i++)
218  vec[i] = matrix(i).double_value ();
219  return retval;
220  }
221 
223  float_array_value (bool = false) const
224  {
225  FloatNDArray retval (matrix.dims ());
226  float *vec = retval.fortran_vec ();
227  octave_idx_type nel = matrix.numel ();
228  for (octave_idx_type i = 0; i < nel; i++)
229  vec[i] = matrix(i).float_value ();
230  return retval;
231  }
232 
234  complex_array_value (bool = false) const
235  {
236  ComplexNDArray retval (matrix.dims ());
237  Complex *vec = retval.fortran_vec ();
238  octave_idx_type nel = matrix.numel ();
239  for (octave_idx_type i = 0; i < nel; i++)
240  vec[i] = Complex (matrix(i).double_value ());
241  return retval;
242  }
243 
245  float_complex_array_value (bool = false) const
246  {
248  FloatComplex *vec = retval.fortran_vec ();
249  octave_idx_type nel = matrix.numel ();
250  for (octave_idx_type i = 0; i < nel; i++)
251  vec[i] = FloatComplex (matrix(i).float_value ());
252  return retval;
253  }
254 
256  bool_array_value (bool warn = false) const
257  {
258  boolNDArray retval (dims ());
259 
260  octave_idx_type nel = numel ();
261 
262  if (warn && matrix.any_element_not_one_or_zero ())
264 
265  bool *vec = retval.fortran_vec ();
266  for (octave_idx_type i = 0; i < nel; i++)
267  vec[i] = matrix(i).bool_value ();
268 
269  return retval;
270  }
271 
273  char_array_value (bool = false) const
274  {
275  charNDArray retval (dims ());
276 
277  octave_idx_type nel = numel ();
278 
279  char *vec = retval.fortran_vec ();
280  for (octave_idx_type i = 0; i < nel; i++)
281  vec[i] = matrix(i).char_value ();
282 
283  return retval;
284  }
285 
286  // Use matrix_ref here to clear index cache.
287  void increment (void)
288  {
289  matrix_ref () += OCTAVE_INT_T (1);
290  }
291 
292  void decrement (void)
293  {
294  matrix_ref () -= OCTAVE_INT_T (1);
295  }
296 
297  void changesign (void)
298  {
299  matrix_ref ().changesign ();
300  }
301 
302  idx_vector index_vector (bool /* require_integers */ = false) const
303  {
304  return idx_cache ? *idx_cache : set_idx_cache (idx_vector (matrix));
305  }
306 
307  int write (octave_stream& os, int block_size,
308  oct_data_conv::data_type output_type, int skip,
310  { return os.write (matrix, block_size, output_type, skip, flt_fmt); }
311 
312  // Unsafe. This function exists to support the MEX interface.
313  // You should not use it anywhere else.
314  void *mex_get_data (void) const { return matrix.mex_get_data (); }
315 
316  mxArray *as_mxArray (void) const
317  {
319 
320  OCTAVE_INT_T::val_type *pr = static_cast<OCTAVE_INT_T::val_type *>
321  (retval->get_data ());
322 
323  mwSize nel = numel ();
324 
325  const OCTAVE_INT_T *p = matrix.data ();
326 
327  for (mwIndex i = 0; i < nel; i++)
328  pr[i] = p[i].value ();
329 
330  return retval;
331  }
332 
334  {
335  switch (umap)
336  {
337  case umap_abs:
338  return matrix.abs ();
339  case umap_signum:
340  return matrix.signum ();
341  case umap_ceil:
342  case umap_conj:
343  case umap_fix:
344  case umap_floor:
345  case umap_real:
346  case umap_round:
347  return matrix;
348  case umap_imag:
349  return intNDArray<OCTAVE_INT_T> (matrix.dims (), OCTAVE_INT_T ());
350  case umap_isnan:
351  case umap_isna:
352  case umap_isinf:
353  return boolNDArray (matrix.dims (), false);
354  case umap_isfinite:
355  return boolNDArray (matrix.dims (), true);
356 
357  // Special cases for Matlab compatibility.
358  case umap_xtolower:
359  case umap_xtoupper:
360  return matrix;
361 
362  default:
363  {
364  // FIXME: we should be able to do better than converting to
365  // double here.
366  octave_matrix m (array_value ());
367  return m.map (umap);
368  }
369  }
370  }
371 
372 private:
373 
375 };
376 
377 class
381 {
382 public:
383 
386 
389 
391 
392  octave_base_value *clone (void) const
393  { return new OCTAVE_VALUE_INT_SCALAR_T (*this); }
394 
396  { return new OCTAVE_VALUE_INT_MATRIX_T (); }
397 
399  bool resize_ok = false)
400  {
401  // FIXME: this doesn't solve the problem of
402  //
403  // a = 1; a([1,1], [1,1], [1,1])
404  //
405  // and similar constructions. Hmm...
406 
407  // FIXME: using this constructor avoids narrowing the
408  // 1x1 matrix back to a scalar value. Need a better solution
409  // to this problem.
410 
414 
415  return tmp.do_index_op (idx, resize_ok);
416  }
417 
418  bool OCTAVE_TYPE_PREDICATE_FUNCTION (void) const { return true; }
419 
420  bool is_integer_type (void) const { return true; }
421 
422  builtin_type_t builtin_type (void) const { return OCTAVE_INT_BTYP; }
423 
424 public:
425 
427  int8_scalar_value (void) const { return octave_int8 (scalar); }
428 
430  int16_scalar_value (void) const { return octave_int16 (scalar); }
431 
433  int32_scalar_value (void) const { return octave_int32 (scalar); }
434 
436  int64_scalar_value (void) const { return octave_int64 (scalar); }
437 
439  uint8_scalar_value (void) const { return octave_uint8 (scalar); }
440 
442  uint16_scalar_value (void) const { return octave_uint16 (scalar); }
443 
445  uint32_scalar_value (void) const { return octave_uint32 (scalar); }
446 
448  uint64_scalar_value (void) const { return octave_uint64 (scalar); }
449 
451  int8_array_value (void) const
452  { return int8NDArray (dim_vector (1, 1), int8_scalar_value ()); }
453 
455  int16_array_value (void) const
456  { return int16NDArray (dim_vector (1, 1), int16_scalar_value ()); }
457 
459  int32_array_value (void) const
460  { return int32NDArray (dim_vector (1, 1), int32_scalar_value ()); }
461 
463  int64_array_value (void) const
464  { return int64NDArray (dim_vector (1, 1), int64_scalar_value ()); }
465 
467  uint8_array_value (void) const
468  { return uint8NDArray (dim_vector (1, 1), uint8_scalar_value ()); }
469 
471  uint16_array_value (void) const
472  { return uint16NDArray (dim_vector (1, 1), uint16_scalar_value ()); }
473 
475  uint32_array_value (void) const
476  { return uint32NDArray (dim_vector (1, 1), uint32_scalar_value ()); }
477 
479  uint64_array_value (void) const
480  { return uint64NDArray (dim_vector (1, 1), uint64_scalar_value ()); }
481 
482  octave_value resize (const dim_vector& dv, bool fill = false) const
483  {
484  if (fill)
485  {
487  if (dv.numel ())
488  retval(0) = scalar;
489  return retval;
490  }
491  else
492  {
494  if (dv.numel ())
495  retval(0) = scalar;
496  return retval;
497  }
498  }
499 
500  double double_value (bool = false) const { return scalar.double_value (); }
501 
502  float float_value (bool = false) const { return scalar.float_value (); }
503 
504  double scalar_value (bool = false) const { return scalar.double_value (); }
505 
506  float float_scalar_value (bool = false) const
507  { return scalar.float_value (); }
508 
509  Matrix
510  matrix_value (bool = false) const
511  {
512  Matrix retval (1, 1);
513  retval(0,0) = scalar.double_value ();
514  return retval;
515  }
516 
518  float_matrix_value (bool = false) const
519  {
520  FloatMatrix retval (1, 1);
521  retval(0,0) = scalar.float_value ();
522  return retval;
523  }
524 
526  complex_matrix_value (bool = false) const
527  {
528  ComplexMatrix retval (1, 1);
529  retval(0,0) = Complex (scalar.double_value ());
530  return retval;
531  }
532 
534  float_complex_matrix_value (bool = false) const
535  {
536  FloatComplexMatrix retval (1, 1);
537  retval(0,0) = FloatComplex (scalar.float_value ());
538  return retval;
539  }
540 
541  NDArray
542  array_value (bool = false) const
543  {
544  NDArray retval (dim_vector (1, 1));
545  retval(0) = scalar.double_value ();
546  return retval;
547  }
548 
550  float_array_value (bool = false) const
551  {
552  FloatNDArray retval (dim_vector (1, 1));
553  retval(0) = scalar.float_value ();
554  return retval;
555  }
556 
558  complex_array_value (bool = false) const
559  {
561  retval(0) = FloatComplex (scalar.double_value ());
562  return retval;
563  }
564 
566  float_complex_array_value (bool = false) const
567  {
569  retval(0) = FloatComplex (scalar.float_value ());
570  return retval;
571  }
572 
573  bool bool_value (bool warn = false) const
574  {
575  if (warn && scalar != 0.0 && scalar != 1.0)
577 
578  return scalar.bool_value ();
579  }
580 
582  bool_array_value (bool warn = false) const
583  {
584  boolNDArray retval (dim_vector (1, 1));
585 
586  if (warn && scalar != 0.0 && scalar != 1.0)
588 
589  retval(0) = scalar.bool_value ();
590 
591  return retval;
592  }
593 
595  char_array_value (bool = false) const
596  {
597  charNDArray retval (dim_vector (1, 1));
598  retval(0) = scalar.char_value ();
599  return retval;
600  }
601 
602  void increment (void)
603  {
604  scalar += OCTAVE_INT_T (1);
605  }
606 
607  void decrement (void)
608  {
609  scalar -= OCTAVE_INT_T (1);
610  }
611 
612  idx_vector index_vector (bool /* require_integers */ = false) const { return idx_vector (scalar); }
613 
614  int write (octave_stream& os, int block_size,
615  oct_data_conv::data_type output_type, octave_idx_type skip,
617  {
619  block_size, output_type, skip, flt_fmt);
620  }
621 
622  // Unsafe. This function exists to support the MEX interface.
623  // You should not use it anywhere else.
624  void *mex_get_data (void) const { return scalar.mex_get_data (); }
625 
626  mxArray *as_mxArray (void) const
627  {
629 
630  OCTAVE_INT_T::val_type *pr = static_cast<OCTAVE_INT_T::val_type *>
631  (retval->get_data ());
632 
633  pr[0] = scalar.value ();
634 
635  return retval;
636  }
637 
639  {
640  switch (umap)
641  {
642  case umap_abs:
643  return scalar.abs ();
644  case umap_signum:
645  return scalar.signum ();
646  case umap_ceil:
647  case umap_conj:
648  case umap_fix:
649  case umap_floor:
650  case umap_real:
651  case umap_round:
652  return scalar;
653  case umap_imag:
654  return OCTAVE_INT_T ();
655  case umap_isnan:
656  case umap_isna:
657  case umap_isinf:
658  return false;
659  case umap_isfinite:
660  return true;
661 
662  // Special cases for Matlab compatibility.
663  case umap_xtolower:
664  case umap_xtoupper:
665  return scalar;
666 
667  default:
668  {
669  octave_scalar m (scalar_value ());
670  return m.map (umap);
671  }
672  }
673  }
674 
675 private:
676 
678 };
double double_value(bool=false) const
Definition: ov-intx.h:108
float float_scalar_value(bool=false) const
Definition: ov-intx.h:141
builtin_type_t builtin_type(void) const
Definition: ov-intx.h:422
void * mex_get_data(void) const
Definition: ov-intx.h:314
octave_int< uint64_t > octave_uint64
bool bool_value(bool warn=false) const
Definition: ov-intx.h:573
double double_value(bool=false) const
Definition: ov-intx.h:500
intNDArray< octave_int64 > int64NDArray
Definition: int64NDArray.h:33
FloatMatrix float_matrix_value(bool=false) const
Definition: ov-intx.h:518
FloatNDArray float_array_value(bool=false) const
Definition: ov-intx.h:550
FloatComplexNDArray float_complex_array_value(bool=false) const
Definition: ov-intx.h:245
uint16NDArray uint16_array_value(void) const
Definition: ov-intx.h:99
nd group nd example oindent but is performed more efficiently If only and it is a scalar
Definition: data.cc:5342
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, octave::mach_info::float_format flt_fmt)
Definition: oct-stream.cc:6647
void warn_logical_conversion(void)
Definition: errwarn.cc:353
intNDArray< octave_uint32 > uint32NDArray
Definition: uint32NDArray.h:33
double scalar_value(bool=false) const
Definition: ov-intx.h:504
intNDArray< octave_uint8 > uint8NDArray
Definition: uint8NDArray.h:33
intNDArray< octave_uint16 > uint16NDArray
Definition: uint16NDArray.h:33
ComplexMatrix complex_matrix_value(bool=false) const
Definition: ov-intx.h:526
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the then the first element defines the pivoting tolerance for the unsymmetric the values defined such that for full matrix
Definition: lu.cc:138
octave_int< uint16_t > octave_uint16
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, octave_idx_type skip, octave::mach_info::float_format flt_fmt) const
Definition: ov-intx.h:614
~OCTAVE_VALUE_INT_SCALAR_T(void)
Definition: ov-intx.h:390
void error(const char *fmt,...)
Definition: error.cc:570
bool is_integer_type(void) const
Definition: ov-intx.h:420
void * get_data(void) const
Definition: mxarray.h:449
bool OCTAVE_TYPE_PREDICATE_FUNCTION(void) const
Definition: ov-intx.h:75
octave_value map(unary_mapper_t umap) const
Definition: ov-intx.h:333
octave::mach_info::float_format flt_fmt
Definition: load-save.cc:723
FloatComplexNDArray float_complex_array_value(bool=false) const
Definition: ov-intx.h:566
ComplexNDArray complex_array_value(bool=false) const
Definition: ov-intx.h:234
uint8NDArray uint8_array_value(void) const
Definition: ov-intx.h:96
double lo_ieee_nan_value(void)
Definition: lo-ieee.cc:126
intNDArray< octave_int16 > int16NDArray
Definition: int16NDArray.h:33
uint8NDArray uint8_array_value(void) const
Definition: ov-intx.h:467
uint32NDArray uint32_array_value(void) const
Definition: ov-intx.h:475
builtin_type_t
Definition: ov-base.h:61
octave_value map(unary_mapper_t umap) const
Definition: ov-scalar.cc:367
#define OCTAVE_INT_T
Definition: ov-int16.h:28
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
Definition: dim-vector.h:389
ComplexNDArray complex_array_value(bool=false) const
Definition: ov-intx.h:558
int8NDArray int8_array_value(void) const
Definition: ov-intx.h:451
builtin_type_t builtin_type(void) const
Definition: ov-intx.h:79
octave_uint32 uint32_scalar_value(void) const
Definition: ov-intx.h:445
octave_value map(unary_mapper_t umap) const
Definition: ov-re-mat.cc:899
FloatComplexMatrix float_complex_matrix_value(bool=false) const
Definition: ov-intx.h:195
void * mex_get_data(void) const
Definition: ov-intx.h:624
#define OCTAVE_VALUE_INT_SCALAR_T
Definition: ov-int16.h:33
uint64NDArray uint64_array_value(void) const
Definition: ov-intx.h:479
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
Definition: ov-base.h:148
int64NDArray int64_array_value(void) const
Definition: ov-intx.h:93
#define OCTINTERP_API
Definition: mexproto.h:69
NDArray array_value(bool=false) const
Definition: ov-intx.h:212
intNDArray< octave_int8 > int8NDArray
Definition: int8NDArray.h:33
octave_base_value * clone(void) const
Definition: ov-intx.h:69
octave_uint16 uint16_scalar_value(void) const
Definition: ov-intx.h:442
octave_uint64 uint64_scalar_value(void) const
Definition: ov-intx.h:448
nd deftypefn *octave_map m
Definition: ov-struct.cc:2058
float float_value(bool=false) const
Definition: ov-intx.h:502
~OCTAVE_VALUE_INT_MATRIX_T(void)
Definition: ov-intx.h:67
int32NDArray int32_array_value(void) const
Definition: ov-intx.h:459
ComplexMatrix complex_matrix_value(bool=false) const
Definition: ov-intx.h:178
uint16NDArray uint16_array_value(void) const
Definition: ov-intx.h:471
double tmp
Definition: data.cc:6300
int8NDArray int8_array_value(void) const
Definition: ov-intx.h:84
Matrix matrix_value(bool=false) const
Definition: ov-intx.h:510
octave_value retval
Definition: data.cc:6294
Matrix matrix_value(bool=false) const
Definition: ov-intx.h:144
int64NDArray int64_array_value(void) const
Definition: ov-intx.h:463
OCTAVE_VALUE_INT_MATRIX_T(const Array< OCTAVE_INT_T > &nda)
Definition: ov-intx.h:63
bool OCTAVE_TYPE_PREDICATE_FUNCTION(void) const
Definition: ov-intx.h:418
#define OCTAVE_VALUE_INT_MATRIX_T
Definition: ov-int16.h:30
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Definition: ov-intx.h:398
Definition: dMatrix.h:37
octave_base_value * empty_clone(void) const
Definition: ov-intx.h:395
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
Definition: sub2ind.cc:255
octave_int32 int32_scalar_value(void) const
Definition: ov-intx.h:433
octave_int16 int16_scalar_value(void) const
Definition: ov-intx.h:430
FloatComplexMatrix float_complex_matrix_value(bool=false) const
Definition: ov-intx.h:534
float lo_ieee_float_nan_value(void)
Definition: lo-ieee.cc:202
float float_value(bool=false) const
Definition: ov-intx.h:124
mxArray * as_mxArray(void) const
Definition: ov-intx.h:626
octave_int< uint32_t > octave_uint32
void mxArray
Definition: mex.h:55
#define OCTAVE_INT_MX_CLASS
Definition: ov-int16.h:38
octave_int8 int8_scalar_value(void) const
Definition: ov-intx.h:427
int write(octave_stream &os, int block_size, oct_data_conv::data_type output_type, int skip, octave::mach_info::float_format flt_fmt) const
Definition: ov-intx.h:307
FloatMatrix float_matrix_value(bool=false) const
Definition: ov-intx.h:161
OCTAVE_VALUE_INT_SCALAR_T(const OCTAVE_INT_T &nda)
Definition: ov-intx.h:387
N Dimensional Array with copy-on-write semantics.
Definition: Array.h:126
NDArray array_value(bool=false) const
Definition: ov-intx.h:542
boolNDArray bool_array_value(bool warn=false) const
Definition: ov-intx.h:256
intNDArray< octave_int32 > int32NDArray
Definition: int32NDArray.h:33
boolNDArray bool_array_value(bool warn=false) const
Definition: ov-intx.h:582
T::size_type numel(const T &str)
Definition: oct-string.cc:61
void err_invalid_conversion(const std::string &from, const std::string &to)
Definition: errwarn.cc:68
float float_scalar_value(bool=false) const
Definition: ov-intx.h:506
#define OCTAVE_VALUE_INT_NDARRAY_EXTRACTOR_FUNCTION
Definition: ov-int16.h:31
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
p
Definition: lu.cc:138
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by nd tex zero divided by nd ifnottex and any operation involving another NaN value(5+NaN).Note that NaN always compares not equal to NaN(NaN!
uint32NDArray uint32_array_value(void) const
Definition: ov-intx.h:102
void warn_implicit_conversion(const char *id, const char *from, const char *to)
Definition: errwarn.cc:332
octave_int< int64_t > octave_int64
#define OCTAVE_INT_BTYP
Definition: ov-int16.h:40
int16NDArray int16_array_value(void) const
Definition: ov-intx.h:87
octave_base_value * clone(void) const
Definition: ov-intx.h:392
octave_idx_type ndims(void) const
Number of dimensions.
Definition: dim-vector.h:301
octave_value resize(const dim_vector &dv, bool fill=false) const
Definition: ov-intx.h:482
FloatNDArray float_array_value(bool=false) const
Definition: ov-intx.h:223
charNDArray char_array_value(bool=false) const
Definition: ov-intx.h:273
bool is_integer_type(void) const
Definition: ov-intx.h:77
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
octave_int< int16_t > octave_int16
int16NDArray int16_array_value(void) const
Definition: ov-intx.h:455
charNDArray char_array_value(bool=false) const
Definition: ov-intx.h:595
octave_value map(unary_mapper_t umap) const
Definition: ov-intx.h:638
Definition: mxarray.h:76
std::complex< double > Complex
Definition: oct-cmplx.h:31
const T * fortran_vec(void) const
Definition: Array.h:584
OCTAVE_VALUE_INT_MATRIX_T(void)
Definition: ov-intx.h:57
octave_int< uint8_t > octave_uint8
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
octave_int< int32_t > octave_int32
octave_int64 int64_scalar_value(void) const
Definition: ov-intx.h:436
OCTAVE_VALUE_INT_MATRIX_T(const intNDArray< OCTAVE_INT_T > &nda)
Definition: ov-intx.h:60
octave_uint8 uint8_scalar_value(void) const
Definition: ov-intx.h:439
dim_vector dv
Definition: sub2ind.cc:263
idx_vector index_vector(bool=false) const
Definition: ov-intx.h:612
int32NDArray int32_array_value(void) const
Definition: ov-intx.h:90
mxArray * as_mxArray(void) const
Definition: ov-intx.h:316
uint64NDArray uint64_array_value(void) const
Definition: ov-intx.h:105
double scalar_value(bool=false) const
Definition: ov-intx.h:139
idx_vector index_vector(bool=false) const
Definition: ov-intx.h:302
octave_int< int8_t > octave_int8
intNDArray< octave_uint64 > uint64NDArray
Definition: uint64NDArray.h:33
octave_base_value * empty_clone(void) const
Definition: ov-intx.h:72
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
Definition: ov.h:454