GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
CNDArray.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1996-2021 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if defined (HAVE_CONFIG_H)
27 # include "config.h"
28 #endif
29 
30 #include <complex>
31 #include <istream>
32 #include <ostream>
33 
34 #include "Array-util.h"
35 #include "CNDArray.h"
36 #include "f77-fcn.h"
37 #include "lo-ieee.h"
38 #include "lo-mappers.h"
39 #include "mx-base.h"
40 #include "mx-cnda-s.h"
41 #include "mx-op-defs.h"
42 #include "oct-fftw.h"
43 #include "oct-locbuf.h"
44 
45 #include "bsxfun-defs.cc"
46 
48  : MArray<Complex> (a.dims ())
49 {
50  octave_idx_type n = a.numel ();
51  for (octave_idx_type i = 0; i < n; i++)
52  xelem (i) = static_cast<unsigned char> (a(i));
53 }
54 
55 #if defined (HAVE_FFTW)
56 
58 ComplexNDArray::fourier (int dim) const
59 {
60  dim_vector dv = dims ();
61 
62  if (dim > dv.ndims () || dim < 0)
63  return ComplexNDArray ();
64 
65  octave_idx_type stride = 1;
66  octave_idx_type n = dv(dim);
67 
68  for (int i = 0; i < dim; i++)
69  stride *= dv(i);
70 
71  octave_idx_type howmany = numel () / dv(dim);
72  howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
73  octave_idx_type nloop = (stride == 1 ? 1 : numel () / dv(dim) / stride);
74  octave_idx_type dist = (stride == 1 ? n : 1);
75 
76  const Complex *in (fortran_vec ());
78  Complex *out (retval.fortran_vec ());
79 
80  // Need to be careful here about the distance between fft's
81  for (octave_idx_type k = 0; k < nloop; k++)
82  octave::fftw::fft (in + k * stride * n, out + k * stride * n,
83  n, howmany, stride, dist);
84 
85  return retval;
86 }
87 
89 ComplexNDArray::ifourier (int dim) const
90 {
91  dim_vector dv = dims ();
92 
93  if (dim > dv.ndims () || dim < 0)
94  return ComplexNDArray ();
95 
96  octave_idx_type stride = 1;
97  octave_idx_type n = dv(dim);
98 
99  for (int i = 0; i < dim; i++)
100  stride *= dv(i);
101 
102  octave_idx_type howmany = numel () / dv(dim);
103  howmany = (stride == 1 ? howmany : (howmany > stride ? stride : howmany));
104  octave_idx_type nloop = (stride == 1 ? 1 : numel () / dv(dim) / stride);
105  octave_idx_type dist = (stride == 1 ? n : 1);
106 
107  const Complex *in (fortran_vec ());
108  ComplexNDArray retval (dv);
109  Complex *out (retval.fortran_vec ());
110 
111  // Need to be careful here about the distance between fft's
112  for (octave_idx_type k = 0; k < nloop; k++)
113  octave::fftw::ifft (in + k * stride * n, out + k * stride * n,
114  n, howmany, stride, dist);
115 
116  return retval;
117 }
118 
121 {
122  dim_vector dv = dims ();
123  if (dv.ndims () < 2)
124  return ComplexNDArray ();
125 
126  dim_vector dv2 (dv(0), dv(1));
127  const Complex *in = fortran_vec ();
128  ComplexNDArray retval (dv);
129  Complex *out = retval.fortran_vec ();
130  octave_idx_type howmany = numel () / dv(0) / dv(1);
131  octave_idx_type dist = dv(0) * dv(1);
132 
133  for (octave_idx_type i=0; i < howmany; i++)
134  octave::fftw::fftNd (in + i*dist, out + i*dist, 2, dv2);
135 
136  return retval;
137 }
138 
141 {
142  dim_vector dv = dims ();
143  if (dv.ndims () < 2)
144  return ComplexNDArray ();
145 
146  dim_vector dv2 (dv(0), dv(1));
147  const Complex *in = fortran_vec ();
148  ComplexNDArray retval (dv);
149  Complex *out = retval.fortran_vec ();
150  octave_idx_type howmany = numel () / dv(0) / dv(1);
151  octave_idx_type dist = dv(0) * dv(1);
152 
153  for (octave_idx_type i=0; i < howmany; i++)
154  octave::fftw::ifftNd (in + i*dist, out + i*dist, 2, dv2);
155 
156  return retval;
157 }
158 
161 {
162  dim_vector dv = dims ();
163  int rank = dv.ndims ();
164 
165  const Complex *in (fortran_vec ());
166  ComplexNDArray retval (dv);
167  Complex *out (retval.fortran_vec ());
168 
169  octave::fftw::fftNd (in, out, rank, dv);
170 
171  return retval;
172 }
173 
176 {
177  dim_vector dv = dims ();
178  int rank = dv.ndims ();
179 
180  const Complex *in (fortran_vec ());
181  ComplexNDArray retval (dv);
182  Complex *out (retval.fortran_vec ());
183 
184  octave::fftw::ifftNd (in, out, rank, dv);
185 
186  return retval;
187 }
188 
189 #else
190 
192 ComplexNDArray::fourier (int dim) const
193 {
194  octave_unused_parameter (dim);
195 
196  (*current_liboctave_error_handler)
197  ("support for FFTW was unavailable or disabled when liboctave was built");
198 
199  return ComplexNDArray ();
200 }
201 
203 ComplexNDArray::ifourier (int dim) const
204 {
205  octave_unused_parameter (dim);
206 
207  (*current_liboctave_error_handler)
208  ("support for FFTW was unavailable or disabled when liboctave was built");
209 
210  return ComplexNDArray ();
211 }
212 
214 ComplexNDArray::fourier2d (void) const
215 {
216  (*current_liboctave_error_handler)
217  ("support for FFTW was unavailable or disabled when liboctave was built");
218 
219  return ComplexNDArray ();
220 }
221 
223 ComplexNDArray::ifourier2d (void) const
224 {
225  (*current_liboctave_error_handler)
226  ("support for FFTW was unavailable or disabled when liboctave was built");
227 
228  return ComplexNDArray ();
229 }
230 
232 ComplexNDArray::fourierNd (void) const
233 {
234  (*current_liboctave_error_handler)
235  ("support for FFTW was unavailable or disabled when liboctave was built");
236 
237  return ComplexNDArray ();
238 }
239 
241 ComplexNDArray::ifourierNd (void) const
242 {
243  (*current_liboctave_error_handler)
244  ("support for FFTW was unavailable or disabled when liboctave was built");
245 
246  return ComplexNDArray ();
247 }
248 
249 #endif
250 
251 // unary operations
252 
255 {
256  if (any_element_is_nan ())
258 
259  return do_mx_unary_op<bool, Complex> (*this, mx_inline_not);
260 }
261 
262 // FIXME: this is not quite the right thing.
263 
264 bool
266 {
267  return do_mx_check<Complex> (*this, mx_inline_any_nan);
268 }
269 
270 bool
272 {
273  return ! do_mx_check<Complex> (*this, mx_inline_all_finite);
274 }
275 
276 // Return true if no elements have imaginary components.
277 
278 bool
280 {
281  return do_mx_check<Complex> (*this, mx_inline_all_real);
282 }
283 
284 // Return nonzero if any element of CM has a non-integer real or
285 // imaginary part. Also extract the largest and smallest (real or
286 // imaginary) values and return them in MAX_VAL and MIN_VAL.
287 
288 bool
289 ComplexNDArray::all_integers (double& max_val, double& min_val) const
290 {
291  octave_idx_type nel = numel ();
292 
293  if (nel > 0)
294  {
295  Complex val = elem (0);
296 
297  double r_val = val.real ();
298  double i_val = val.imag ();
299 
300  max_val = r_val;
301  min_val = r_val;
302 
303  if (i_val > max_val)
304  max_val = i_val;
305 
306  if (i_val < max_val)
307  min_val = i_val;
308  }
309  else
310  return false;
311 
312  for (octave_idx_type i = 0; i < nel; i++)
313  {
314  Complex val = elem (i);
315 
316  double r_val = val.real ();
317  double i_val = val.imag ();
318 
319  if (r_val > max_val)
320  max_val = r_val;
321 
322  if (i_val > max_val)
323  max_val = i_val;
324 
325  if (r_val < min_val)
326  min_val = r_val;
327 
328  if (i_val < min_val)
329  min_val = i_val;
330 
331  if (octave::math::x_nint (r_val) != r_val
332  || octave::math::x_nint (i_val) != i_val)
333  return false;
334  }
335 
336  return true;
337 }
338 
339 bool
341 {
343 }
344 
346 ComplexNDArray::all (int dim) const
347 {
348  return do_mx_red_op<bool, Complex> (*this, dim, mx_inline_all);
349 }
350 
352 ComplexNDArray::any (int dim) const
353 {
354  return do_mx_red_op<bool, Complex> (*this, dim, mx_inline_any);
355 }
356 
358 ComplexNDArray::cumprod (int dim) const
359 {
360  return do_mx_cum_op<Complex, Complex> (*this, dim, mx_inline_cumprod);
361 }
362 
364 ComplexNDArray::cumsum (int dim) const
365 {
366  return do_mx_cum_op<Complex, Complex> (*this, dim, mx_inline_cumsum);
367 }
368 
370 ComplexNDArray::prod (int dim) const
371 {
372  return do_mx_red_op<Complex, Complex> (*this, dim, mx_inline_prod);
373 }
374 
376 ComplexNDArray::sum (int dim) const
377 {
378  return do_mx_red_op<Complex, Complex> (*this, dim, mx_inline_sum);
379 }
380 
382 ComplexNDArray::xsum (int dim) const
383 {
384  return do_mx_red_op<Complex, Complex> (*this, dim, mx_inline_xsum);
385 }
386 
388 ComplexNDArray::sumsq (int dim) const
389 {
390  return do_mx_red_op<double, Complex> (*this, dim, mx_inline_sumsq);
391 }
392 
394 ComplexNDArray::diff (octave_idx_type order, int dim) const
395 {
396  return do_mx_diff_op<Complex> (*this, dim, order, mx_inline_diff);
397 }
398 
402 {
403  if (rb.numel () > 0)
404  insert (rb, ra_idx);
405  return *this;
406 }
407 
410 {
411  ComplexNDArray tmp (rb);
412  if (rb.numel () > 0)
413  insert (tmp, ra_idx);
414  return *this;
415 }
416 
419 {
420  ComplexNDArray retval (ra);
421  if (rb.numel () > 0)
422  retval.insert (rb, ra_idx);
423  return retval;
424 }
425 
428 
430 ComplexNDArray::max (int dim) const
431 {
432  return do_mx_minmax_op<Complex> (*this, dim, mx_inline_max);
433 }
434 
437 {
438  return do_mx_minmax_op<Complex> (*this, idx_arg, dim, mx_inline_max);
439 }
440 
442 ComplexNDArray::min (int dim) const
443 {
444  return do_mx_minmax_op<Complex> (*this, dim, mx_inline_min);
445 }
446 
449 {
450  return do_mx_minmax_op<Complex> (*this, idx_arg, dim, mx_inline_min);
451 }
452 
454 ComplexNDArray::cummax (int dim) const
455 {
456  return do_mx_cumminmax_op<Complex> (*this, dim, mx_inline_cummax);
457 }
458 
461 {
462  return do_mx_cumminmax_op<Complex> (*this, idx_arg, dim, mx_inline_cummax);
463 }
464 
466 ComplexNDArray::cummin (int dim) const
467 {
468  return do_mx_cumminmax_op<Complex> (*this, dim, mx_inline_cummin);
469 }
470 
473 {
474  return do_mx_cumminmax_op<Complex> (*this, idx_arg, dim, mx_inline_cummin);
475 }
476 
477 NDArray
479 {
480  return do_mx_unary_map<double, Complex, std::abs> (*this);
481 }
482 
485 {
486  return do_mx_unary_map<bool, Complex, octave::math::isnan> (*this);
487 }
488 
491 {
492  return do_mx_unary_map<bool, Complex, octave::math::isinf> (*this);
493 }
494 
497 {
498  return do_mx_unary_map<bool, Complex, octave::math::isfinite> (*this);
499 }
500 
503 {
504  return do_mx_unary_map<Complex, Complex, std::conj<double>> (a);
505 }
506 
509 {
510  dim_vector a_dv = a.dims ();
511 
512  int n = a_dv.ndims ();
513 
514  if (n != dimensions.ndims ())
515  (*current_liboctave_error_handler)
516  ("Array<T>::insert: invalid indexing operation");
517 
518  Array<octave_idx_type> a_ra_idx (dim_vector (a_dv.ndims (), 1), 0);
519 
520  a_ra_idx.elem (0) = r;
521  a_ra_idx.elem (1) = c;
522 
523  for (int i = 0; i < n; i++)
524  {
525  if (a_ra_idx(i) < 0 || (a_ra_idx(i) + a_dv(i)) > dimensions(i))
526  (*current_liboctave_error_handler)
527  ("Array<T>::insert: range error for insert");
528  }
529 
530  a_ra_idx.elem (0) = 0;
531  a_ra_idx.elem (1) = 0;
532 
533  octave_idx_type n_elt = a.numel ();
534 
535  // IS make_unique () NECESSARY HERE?
536 
537  for (octave_idx_type i = 0; i < n_elt; i++)
538  {
539  Array<octave_idx_type> ra_idx = a_ra_idx;
540 
541  ra_idx.elem (0) = a_ra_idx(0) + r;
542  ra_idx.elem (1) = a_ra_idx(1) + c;
543 
544  elem (ra_idx) = a.elem (a_ra_idx);
545 
546  increment_index (a_ra_idx, a_dv);
547  }
548 
549  return *this;
550 }
551 
555 {
556  Array<Complex>::insert (a, r, c);
557  return *this;
558 }
559 
563 {
565  return *this;
566 }
567 
568 void
570  const dim_vector& dimensions,
571  int start_dimension)
572 {
573  ::increment_index (ra_idx, dimensions, start_dimension);
574 }
575 
578  const dim_vector& dimensions)
579 {
581 }
582 
585 {
586  return MArray<Complex>::diag (k);
587 }
588 
591 {
592  return MArray<Complex>::diag (m, n);
593 }
594 
595 // This contains no information on the array structure !!!
596 std::ostream&
597 operator << (std::ostream& os, const ComplexNDArray& a)
598 {
599  octave_idx_type nel = a.numel ();
600 
601  for (octave_idx_type i = 0; i < nel; i++)
602  {
603  os << ' ';
604  octave_write_complex (os, a.elem (i));
605  os << "\n";
606  }
607  return os;
608 }
609 
610 std::istream&
611 operator >> (std::istream& is, ComplexNDArray& a)
612 {
613  octave_idx_type nel = a.numel ();
614 
615  if (nel > 0)
616  {
617  Complex tmp;
618  for (octave_idx_type i = 0; i < nel; i++)
619  {
620  tmp = octave_read_value<Complex> (is);
621  if (is)
622  a.elem (i) = tmp;
623  else
624  return is;
625  }
626  }
627 
628  return is;
629 }
630 
632 
635 
638 
641 
642 ComplexNDArray& operator *= (ComplexNDArray& a, double s)
643 {
644  if (a.is_shared ())
645  a = a * s;
646  else
647  do_ms_inplace_op<Complex, double> (a, s, mx_inline_mul2);
648  return a;
649 }
650 
652 {
653  if (a.is_shared ())
654  return a = a / s;
655  else
656  do_ms_inplace_op<Complex, double> (a, s, mx_inline_div2);
657  return a;
658 }
659 
662 
octave_idx_type compute_index(octave_idx_type n, const dim_vector &dims)
Definition: Array-util.cc:177
std::ostream & operator<<(std::ostream &os, const ComplexNDArray &a)
Definition: CNDArray.cc:597
ComplexNDArray & operator/=(ComplexNDArray &a, double s)
Definition: CNDArray.cc:651
ComplexNDArray conj(const ComplexNDArray &a)
Definition: CNDArray.cc:502
static const Complex Complex_NaN_result(octave::numeric_limits< double >::NaN(), octave::numeric_limits< double >::NaN())
ComplexNDArray concat(NDArray &ra, ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
Definition: CNDArray.cc:418
std::istream & operator>>(std::istream &is, ComplexNDArray &a)
Definition: CNDArray.cc:611
#define NaN
Definition: Faddeeva.cc:248
#define BSXFUN_STDREL_DEFS_MXLOOP(ARRAY)
Definition: bsxfun-defs.cc:244
#define BSXFUN_STDOP_DEFS_MXLOOP(ARRAY)
Definition: bsxfun-defs.cc:236
#define BSXFUN_OP_DEF_MXLOOP(OP, ARRAY, LOOP)
Definition: bsxfun-defs.cc:221
Array< T > & insert(const Array< T > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
Definition: Array.cc:1584
T & xelem(octave_idx_type n)
Size of the specified dimension.
Definition: Array.h:469
octave_idx_type numel(void) const
Number of elements in the array.
Definition: Array.h:377
dim_vector dimensions
Definition: Array.h:217
bool test_any(F fcn) const
Simpler calls.
Definition: Array.h:810
T & elem(octave_idx_type n)
Size of the specified dimension.
Definition: Array.h:499
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
Definition: Array.cc:2528
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
Definition: Array.h:453
const T * fortran_vec(void) const
Size of the specified dimension.
Definition: Array.h:583
bool is_shared(void)
Size of the specified dimension.
Definition: Array.h:587
ComplexNDArray ifourier2d(void) const
Definition: CNDArray.cc:140
ComplexNDArray fourier(int dim=1) const
Definition: CNDArray.cc:58
boolNDArray any(int dim=-1) const
Definition: CNDArray.cc:352
bool any_element_is_inf_or_nan(void) const
Definition: CNDArray.cc:271
ComplexNDArray prod(int dim=-1) const
Definition: CNDArray.cc:370
static void increment_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions, int start_dimension=0)
Definition: CNDArray.cc:569
static octave_idx_type compute_index(Array< octave_idx_type > &ra_idx, const dim_vector &dimensions)
Definition: CNDArray.cc:577
ComplexNDArray cummax(int dim=-1) const
Definition: CNDArray.cc:454
ComplexNDArray fourierNd(void) const
Definition: CNDArray.cc:160
ComplexNDArray sumsq(int dim=-1) const
Definition: CNDArray.cc:388
ComplexNDArray concat(const ComplexNDArray &rb, const Array< octave_idx_type > &ra_idx)
Definition: CNDArray.cc:400
ComplexNDArray diag(octave_idx_type k=0) const
Definition: CNDArray.cc:584
ComplexNDArray cumsum(int dim=-1) const
Definition: CNDArray.cc:364
bool too_large_for_float(void) const
Definition: CNDArray.cc:340
boolNDArray operator!(void) const
Definition: CNDArray.cc:254
boolNDArray isnan(void) const
Definition: CNDArray.cc:484
ComplexNDArray min(int dim=-1) const
Definition: CNDArray.cc:442
ComplexNDArray & insert(const NDArray &a, octave_idx_type r, octave_idx_type c)
Definition: CNDArray.cc:508
ComplexNDArray ifourier(int dim=1) const
Definition: CNDArray.cc:89
ComplexNDArray diff(octave_idx_type order=1, int dim=-1) const
Definition: CNDArray.cc:394
NDArray abs(void) const
Definition: CNDArray.cc:478
ComplexNDArray max(int dim=-1) const
Definition: CNDArray.cc:430
ComplexNDArray ifourierNd(void) const
Definition: CNDArray.cc:175
ComplexNDArray(void)
Definition: CNDArray.h:42
ComplexNDArray xsum(int dim=-1) const
Definition: CNDArray.cc:382
bool all_integers(double &max_val, double &min_val) const
Definition: CNDArray.cc:289
ComplexNDArray cumprod(int dim=-1) const
Definition: CNDArray.cc:358
boolNDArray all(int dim=-1) const
Definition: CNDArray.cc:346
boolNDArray isfinite(void) const
Definition: CNDArray.cc:496
ComplexNDArray cummin(int dim=-1) const
Definition: CNDArray.cc:466
ComplexNDArray sum(int dim=-1) const
Definition: CNDArray.cc:376
boolNDArray isinf(void) const
Definition: CNDArray.cc:490
ComplexNDArray fourier2d(void) const
Definition: CNDArray.cc:120
bool any_element_is_nan(void) const
Definition: CNDArray.cc:265
bool all_elements_are_real(void) const
Definition: CNDArray.cc:279
Template for N-dimensional array classes with like-type math operators.
Definition: MArray.h:63
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:95
octave_idx_type ndims(void) const
Number of dimensions.
Definition: dim-vector.h:334
static int fft(const double *in, Complex *out, size_t npts, size_t nsamples=1, octave_idx_type stride=1, octave_idx_type dist=-1)
Definition: oct-fftw.cc:852
static int fftNd(const double *, Complex *, const int, const dim_vector &)
Definition: oct-fftw.cc:916
static int ifftNd(const Complex *, Complex *, const int, const dim_vector &)
Definition: oct-fftw.cc:962
static int ifft(const Complex *in, Complex *out, size_t npts, size_t nsamples=1, octave_idx_type stride=1, octave_idx_type dist=-1)
Definition: oct-fftw.cc:892
bool xtoo_large_for_float(double x)
Definition: lo-utils.cc:55
void octave_write_complex(std::ostream &os, const Complex &c)
Definition: lo-utils.cc:400
bool mx_inline_all_finite(size_t n, const T *x)
Definition: mx-inlines.cc:270
T mx_inline_xsum(const T *v, octave_idx_type n)
Definition: mx-inlines.cc:1698
void mx_inline_div2(size_t n, R *r, const X *x)
Definition: mx-inlines.cc:129
void mx_inline_any(const T *v, bool *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
Definition: mx-inlines.cc:851
void mx_inline_cummin(const T *v, T *r, octave_idx_type n)
Definition: mx-inlines.cc:1193
void mx_inline_cumprod(const T *v, T *r, octave_idx_type n)
Definition: mx-inlines.cc:868
void mx_inline_cumsum(const T *v, T *r, octave_idx_type n)
Definition: mx-inlines.cc:867
void mx_inline_not(size_t n, bool *r, const X *x)
Definition: mx-inlines.cc:181
void mx_inline_max(const T *v, T *r, octave_idx_type n)
Definition: mx-inlines.cc:972
void mx_inline_all(const T *v, bool *r, octave_idx_type m, octave_idx_type n)
Definition: mx-inlines.cc:817
void mx_inline_prod(const T *v, T *r, octave_idx_type l, octave_idx_type n, octave_idx_type u)
Definition: mx-inlines.cc:847
void mx_inline_cummax(const T *v, T *r, octave_idx_type n)
Definition: mx-inlines.cc:1194
bool mx_inline_all_real(size_t n, const std::complex< T > *x)
Definition: mx-inlines.cc:309
T mx_inline_sumsq(const T *v, octave_idx_type n)
Definition: mx-inlines.cc:755
bool mx_inline_any_nan(size_t n, const T *x)
Definition: mx-inlines.cc:257
T mx_inline_sum(const T *v, octave_idx_type n)
Definition: mx-inlines.cc:752
void mx_inline_min(const T *v, T *r, octave_idx_type n)
Definition: mx-inlines.cc:971
T octave_idx_type m
Definition: mx-inlines.cc:773
void mx_inline_diff(const T *v, T *r, octave_idx_type n, octave_idx_type order)
Definition: mx-inlines.cc:1390
octave_idx_type n
Definition: mx-inlines.cc:753
T * r
Definition: mx-inlines.cc:773
void mx_inline_mul2(size_t n, R *r, const X *x)
Definition: mx-inlines.cc:128
void mx_inline_pow(size_t n, R *r, const X *x, const Y *y)
Definition: mx-inlines.cc:414
#define NDND_BOOL_OPS(ND1, ND2)
Definition: mx-op-defs.h:350
#define NDS_BOOL_OPS(ND, S)
Definition: mx-op-defs.h:256
#define NDND_CMP_OPS(ND1, ND2)
Definition: mx-op-defs.h:333
#define SND_BOOL_OPS(S, ND)
Definition: mx-op-defs.h:303
#define NDS_CMP_OPS(ND, S)
Definition: mx-op-defs.h:239
#define SND_CMP_OPS(S, ND)
Definition: mx-op-defs.h:286
#define MINMAX_FCNS(T, S)
Definition: mx-op-defs.h:589
T x_nint(T x)
Definition: lo-mappers.h:262
void err_nan_to_logical_conversion(void)
std::complex< double > Complex
Definition: oct-cmplx.h:33
octave_int< T > pow(const octave_int< T > &a, const octave_int< T > &b)
const octave_base_value const Array< octave_idx_type > & ra_idx
octave_value::octave_value(const Array< char > &chm, char type) return retval
Definition: ov.cc:811