29#define SWIGLAL_MODULE_RENAME_VARIABLES
32%include <octcomplex.swg>
37#include <octave/ov-cell.h>
38#include <octave/ov-int-traits.h>
39#include <octave/ov-flt-re-mat.h>
40#include <octave/ov-re-mat.h>
41#include <octave/ov-flt-cx-mat.h>
42#include <octave/ov-cx-mat.h>
43#include <octave/Array-util.h>
49#define swiglal_not_empty(v) (!(v).is_empty())
54#define swiglal_self() (args.length() > 0 ? args(0) : octave_value())
55#define swiglal_no_self() (octave_value())
60#define swiglal_1starg() (args.length() > 0 ? args(0) : octave_value())
65#define swiglal_get_reference(v) (v)
71#define swiglal_maybe_return_int() \
72 if (_out.length() > 1) _out = _out.slice(1, _out.length() - 1)
77#define swiglal_null_ptr(v) (!(v).is_string() && (v).is_matrix_type() && (v).rows() == 0 && (v).columns() == 0)
82SWIGINTERN
int swiglal_output_stdouterr(
void) {
85 fflush(swiglal_tmp_stdout);
86 rewind(swiglal_tmp_stdout);
87 fflush(swiglal_tmp_stderr);
88 rewind(swiglal_tmp_stderr);
92 octave_value_list
args = feval(
"stdout", octave_value_list(), 1);
93 if (
args.length() < 1) {
97 args(1) = octave_value(std::string(
"%s"));
99 while (fgets(buf,
sizeof(buf), swiglal_tmp_stdout) != NULL) {
100 args(2) = octave_value(std::string(buf));
101 feval(
"fprintf",
args, 0);
107 octave_value_list
args = feval(
"stderr", octave_value_list(), 1);
108 if (
args.length() < 1) {
112 args(1) = octave_value(std::string(
"%s"));
114 while (fgets(buf,
sizeof(buf), swiglal_tmp_stderr) != NULL) {
115 args(2) = octave_value(std::string(buf));
116 feval(
"fprintf",
args, 0);
121 fclose(swiglal_tmp_stdout);
122 fclose(swiglal_tmp_stderr);
134%define %swiglal_oct_urn_op(NAME, OCTNAME)
135%rename(__##OCTNAME##__) *::__##NAME##__;
136%newobject *::__##NAME##__;
138%swiglal_oct_urn_op(abs, abs);
139%swiglal_oct_urn_op(neg, uminus);
140%swiglal_oct_urn_op(pos, uplus);
143%define %swiglal_oct_bin_op(NAME)
144%newobject *::__##NAME##__;
145%newobject *::__r##NAME##__;
147%swiglal_oct_bin_op(add);
148%swiglal_oct_bin_op(and);
149%swiglal_oct_bin_op(div);
150%swiglal_oct_bin_op(lshift);
151%swiglal_oct_bin_op(mod);
152%swiglal_oct_bin_op(mul);
153%swiglal_oct_bin_op(or);
154%swiglal_oct_bin_op(pow);
155%swiglal_oct_bin_op(rshift);
156%swiglal_oct_bin_op(sub);
157%swiglal_oct_bin_op(xor);
160%typemap(in, numinputs=0) void* SWIGLAL_OP_POW_3RDARG "";
163%typemap(in, numinputs=0, noblock=1)
int SWIGLAL_CMP_OP_RETN_HACK "";
170%define %swiglal_struct_extend_specific(TAGNAME, OPAQUE, DTORFUNC)
179%swig_cplxflt_convn(gsl_complex_float, gsl_complex_float_rect, GSL_REAL, GSL_IMAG);
180%swig_cplxdbl_convn(gsl_complex, gsl_complex_rect, GSL_REAL, GSL_IMAG);
181%typemaps_primitive(%checkcode(CPLXFLT), gsl_complex_float);
182%typemaps_primitive(%checkcode(CPLXDBL), gsl_complex);
187%typemaps_primitive(%checkcode(CPLXFLT),
COMPLEX8);
188%typemaps_primitive(%checkcode(CPLXDBL),
COMPLEX16);
191%typemap(in, fragment=SWIG_AsVal_frag(
double)) struct tm* (struct tm temptm) {
194 octave_value_list datenum_args;
195 if ($input.is_string()) {
196 datenum_args.append($input);
198 dim_vector dims = $input.dims();
199 if (dims.length() == 2 && dims.num_ones() == 1 && 3 <= dims.numel() && dims.numel() <= 6) {
200 RowVector datevec = $input.row_vector_value();
201 for (
int i = 0; i < datevec.numel(); ++i) {
202 datenum_args.append(octave_value(datevec(i)));
206 octave_value_list retn;
207 if (datenum_args.length() > 0) {
208 retn = feval(
"datenum", datenum_args, 1);
210 if (retn.length() == 0) {
211 %argument_fail(SWIG_ValueError,
"$type", $symname, $argnum);
214 int res = SWIG_AsVal(
double)(retn(0), &datenum);
215 if (!SWIG_IsOK(res)) {
216 %argument_fail(res,
"$type", $symname, $argnum);
222 time_t t = (time_t) llround((datenum - 719529) * 86400);
225 memset(&temptm, 0,
sizeof(temptm));
226 if (
gmtime_r(&t, &temptm) == NULL) {
227 %argument_fail(SWIG_RuntimeError,
"$type", $symname, $argnum);
233%typemap(freearg)
struct tm*
"";
234%typemap(out)
struct tm* {
237 RowVector datevec(6);
240 datevec(0) = $1->tm_year + 1900;
241 datevec(1) = $1->tm_mon + 1;
242 datevec(2) = $1->tm_mday;
243 datevec(3) = $1->tm_hour;
244 datevec(4) = $1->tm_min;
245 datevec(5) = $1->tm_sec;
247 $result = octave_value(datevec);
255%fragment(
"SWIG_AsCharPtrAndSize");
256%fragment(
"SWIG_FromCharPtr");
261 const char*
const swig_runtime_version_name =
"__SWIGLAL_RUNTIME_DATA_swig_runtime_version__";
262 const char*
const last_swiglal_wrapper_name =
"__SWIGLAL_RUNTIME_DATA_last_swiglal_wrapper__";
263 octave_value ov = SWIG_Octave_GetGlobalValue(swig_runtime_version_name);
264 octave_value ov2 = SWIG_Octave_GetGlobalValue(last_swiglal_wrapper_name);
265 char *swig_runtime_version_str = NULL;
267 int res = SWIG_AsCharPtrAndSize(ov, &swig_runtime_version_str, NULL, &alloc);
268 if (SWIG_IsOK(res)) {
269 char *last_swiglal_wrapper_str = NULL;
271 int res2 = SWIG_AsCharPtrAndSize(ov2, &last_swiglal_wrapper_str, NULL, &alloc2);
272 assert(SWIG_IsOK(res2));
273 if (strcmp(swig_runtime_version_str, SWIG_RUNTIME_VERSION) != 0) {
275 "Mismatch in SWIG runtime versions: %s is version %s, but %s has already been loaded with version %s",
276 SWIGLAL_PACKAGE, SWIG_RUNTIME_VERSION, last_swiglal_wrapper_str, swig_runtime_version_str
279 free(swig_runtime_version_str);
282 free(last_swiglal_wrapper_str);
287 free(swig_runtime_version_str);
290 free(last_swiglal_wrapper_str);
293 ov = SWIG_FromCharPtr(SWIG_RUNTIME_VERSION);
294 SWIG_Octave_SetGlobalValue(swig_runtime_version_name, ov);
296 ov2 = SWIG_FromCharPtr(SWIGLAL_PACKAGE);
297 SWIG_Octave_SetGlobalValue(last_swiglal_wrapper_name, ov2);
315typedef std::pair<octave_value, int> swiglal_oct_parent;
316typedef std::pair<void*, swiglal_oct_parent> swiglal_oct_parent_pair;
317typedef std::map<void*, swiglal_oct_parent> swiglal_oct_parent_map;
318static swiglal_oct_parent_map* parent_map = 0;
322SWIGINTERN
void swiglal_store_parent(
void* ptr, octave_value parent) {
324 assert(parent.is_defined());
325 swiglal_oct_parent_map::iterator i = parent_map->find(ptr);
326 if (i == parent_map->end()) {
327 parent_map->insert(swiglal_oct_parent_pair(ptr, swiglal_oct_parent(parent, 1)));
338SWIGINTERN
bool swiglal_release_parent(
void *ptr) {
341 swiglal_oct_parent_map::iterator i = parent_map->find(ptr);
342 if (i != parent_map->end()) {
344 if (--i->second.second == 0) {
345 parent_map->erase(i);
360 const char*
const parent_map_name =
"__SWIGLAL_RUNTIME_DATA_parent_map__";
361 octave_value ov = SWIG_Octave_GetGlobalValue(parent_map_name);
362 int res = SWIG_ConvertPacked(ov, &parent_map,
sizeof(parent_map), 0);
363 if (!SWIG_IsOK(res)) {
364 parent_map =
new swiglal_oct_parent_map();
365 ov = SWIG_NewPackedObj(&parent_map,
sizeof(parent_map), 0);
366 SWIG_Octave_SetGlobalValue(parent_map_name, ov);
381#define %swiglal_oct_array_view_class(ACFTYPE) swiglal_oct_array_view_##ACFTYPE
384#define %swiglal_oct_array_view_helper_class(ACFTYPE) swiglal_oct_array_view_helper_##ACFTYPE
387#define %swiglal_oct_array_view_tmpl(ACFTYPE) swiglal_oct_array_view<%swiglal_oct_array_view_helper_class(ACFTYPE) >
390#define %swiglal_oct_array_view_ovtype(ACFTYPE) "swiglal_oct_array_view_" %str(ACFTYPE)
393#define %swiglal_oct_array_view_frag(ACFTYPE) "swiglal_oct_array_view_" %str(ACFTYPE)
397#define %swiglal_oct_array_view_init_frag(ACFTYPE) "swiglal_oct_array_view_init_" %str(ACFTYPE)
402%fragment(
"swiglal_oct_array_view",
"header") {
406 template<
class HELPER>
407 class swiglal_oct_array_view :
public octave_base_value {
413 const typename HELPER::OVClass sloav_class;
417 const octave_value sloav_parent;
420 void *
const sloav_ptr;
421 const size_t sloav_esize;
422 const size_t sloav_ndims;
423 const dim_vector sloav_dims;
424 const dim_vector sloav_strides;
425 const bool sloav_isptr;
426 swig_type_info *
const sloav_tinfo;
427 const int sloav_tflags;
430 static dim_vector sloav_make_dim_vector(
const size_t n,
const size_t v[]) {
432 for (
size_t i = 0; i < n; ++i) {
439 static octave_base_value* sloav_numeric_conversion_function(
const octave_base_value& v) {
440 const swiglal_oct_array_view& oav =
dynamic_cast<const swiglal_oct_array_view&
>(v);
441 octave_value ov = oav.sloav_array_out();
442 return new typename HELPER::OVClass(HELPER::ovvalue(ov));
446 void* sloav_get_element_ptr(Array<octave_idx_type>& idx)
const {
448 for (
size_t j = 0; j < sloav_ndims; ++j) {
449 elemidx += idx(j) * sloav_strides(j);
451 return reinterpret_cast<void*
>(
reinterpret_cast<char*
>(sloav_ptr) + elemidx*sloav_esize);
455 void sloav_increment_idx(Array<octave_idx_type>& idx)
const {
456 for (
int j = sloav_ndims-1; j >= 0; --j) {
457 if (++idx(j) < sloav_dims(j)) {
466 virtual ~swiglal_oct_array_view()
469 swiglal_oct_array_view()
470 : octave_base_value(), sloav_class(typename HELPER::OVClass()),
471 sloav_parent(), sloav_ptr(0), sloav_esize(0), sloav_ndims(0),
472 sloav_dims(), sloav_strides(),
473 sloav_isptr(false), sloav_tinfo(0), sloav_tflags(0)
476 swiglal_oct_array_view(
const octave_value& parent,
481 const size_t strides[],
483 swig_type_info* tinfo,
485 : octave_base_value(), sloav_class(typename HELPER::OVClass()),
486 sloav_parent(parent), sloav_ptr(ptr), sloav_esize(esize), sloav_ndims(ndims),
487 sloav_dims(sloav_make_dim_vector(ndims, dims)),
488 sloav_strides(sloav_make_dim_vector(ndims, strides)),
489 sloav_isptr(isptr), sloav_tinfo(tinfo), sloav_tflags(tflags)
493 int sloav_array_in(octave_value& obj,
int *pelemalloc,
const int tflags) {
497 return SWIG_MemoryError;
503 dim_vector objdims = obj.dims();
504 if (sloav_ndims == 1) {
505 if (objdims.length() > 2 || objdims.num_ones() == 0 || objdims.numel() != sloav_dims(0)) {
506 return SWIG_ValueError;
509 else if (objdims != sloav_dims) {
510 return SWIG_ValueError;
514 Array<octave_idx_type> idx(dim_vector(1, sloav_ndims), 0);
515 std::list<octave_value_list> objidx(1);
516 for (
int i = 0; i < objdims.numel(); ++i) {
519 objidx.front()(0) = get_scalar_idx(idx, objdims) + 1;
520 octave_value objelem = obj.subsref(obj.is_cell() ?
"{" :
"(", objidx);
523 int res = HELPER::incall(sloav_parent, objelem, sloav_get_element_ptr(idx), pelemalloc, sloav_esize, sloav_isptr, sloav_tinfo, sloav_tflags | tflags);
524 if (!SWIG_IsOK(res)) {
529 sloav_increment_idx(idx);
538 octave_value sloav_array_out(
const bool copyobj =
false)
const {
542 return octave_value();
546 dim_vector objdims = sloav_dims;
547 typename HELPER::OVType objval(objdims);
548 octave_value obj(objval);
551 Array<octave_idx_type> idx(dim_vector(1, sloav_ndims), 0);
552 std::list<octave_value_list> objidx(1);
553 for (
int i = 0; i < objdims.numel(); ++i) {
556 objidx.front()(0) = get_scalar_idx(idx, objdims) + 1;
559 octave_value objelem = HELPER::outcall(sloav_parent, copyobj, sloav_get_element_ptr(idx), sloav_esize, sloav_isptr, sloav_tinfo, sloav_tflags);
560 obj = obj.subsasgn(obj.is_cell() ?
"{" :
"(", objidx, objelem);
563 sloav_increment_idx(idx);
574 dim_vector dims()
const {
579 octave_value full_value()
const {
580 return sloav_array_out();
584 octave_base_value* empty_clone()
const {
585 return sloav_array_out().empty_clone();
589 octave_base_value::type_conv_info numeric_conversion_function()
const {
590 return octave_base_value::type_conv_info(sloav_numeric_conversion_function, sloav_class.type_id());
594 octave_value do_index_op(
const octave_value_list& idx,
bool resize_ok) {
595 return sloav_array_out().do_index_op(idx,
false);
597 octave_value_list do_multi_index_op(
int nargout,
const octave_value_list& idx) {
598 return sloav_array_out().do_multi_index_op(nargout, idx);
602 octave_value subsref(
const std::string& type,
const std::list<octave_value_list>& idx) {
603 return sloav_array_out().subsref(type, idx);
605 octave_value_list subsref(
const std::string& type,
const std::list<octave_value_list>& idx,
int nargout) {
606 return sloav_array_out().subsref(type, idx, nargout);
610 octave_value subsasgn(
const std::string& type,
const std::list<octave_value_list>& idx,
const octave_value& rhs) {
611 octave_value obj = sloav_array_out().subsasgn(type, idx, rhs);
621 int res = sloav_array_in(obj, &elemalloc, sloav_isptr ? SWIG_POINTER_DISOWN : 0);
622 if (!SWIG_IsOK(res)) {
623 std::string n = type_name();
624 std::string e = SWIG_ErrorType(res).string_value();
625 error(
"failed to perform indexed assignment for %s type: %s", n.c_str(), e.c_str());
626 return octave_value();
629 return octave_value(
this);
633 bool save_ascii (std::ostream& os) {
634 return sloav_array_out().save_ascii(os);
636 bool load_ascii(std::istream& is) {
637 octave_value obj = sloav_array_out();
639 return obj.load_ascii(is) && SWIG_IsOK(sloav_array_in(obj, &elemalloc, 0));
643 bool save_binary(std::ostream& os,
bool& save_as_floats) {
644 return sloav_array_out().save_binary(os, save_as_floats);
646 bool load_binary(std::istream& is,
bool swap, oct_mach_info::float_format fmt) {
647 octave_value obj = sloav_array_out();
649 return obj.load_binary(is, swap, fmt) && SWIG_IsOK(sloav_array_in(obj, &elemalloc, 0));
654%#
if SWIG_OCTAVE_PREREQ(4,0,0)
655 bool save_hdf5(octave_hdf5_id loc_id, const
char *
name,
bool save_as_floats) {
656 return sloav_array_out().save_hdf5(loc_id,
name, save_as_floats);
659 bool save_hdf5(hid_t loc_id,
const char *
name,
bool save_as_floats) {
660 return sloav_array_out().save_hdf5(loc_id,
name, save_as_floats);
663%#
if SWIG_OCTAVE_PREREQ(4,0,0)
664 bool load_hdf5(octave_hdf5_id loc_id, const
char *
name) {
665 octave_value obj = sloav_array_out();
667 return obj.load_hdf5(loc_id,
name) && SWIG_IsOK(sloav_array_in(obj, &elemalloc, 0));
669%#elif SWIG_OCTAVE_PREREQ(3,3,52)
670 bool load_hdf5(hid_t loc_id, const
char *
name) {
671 octave_value obj = sloav_array_out();
673 return obj.load_hdf5(loc_id,
name) && SWIG_IsOK(sloav_array_in(obj, &elemalloc, 0));
676 bool load_hdf5(hid_t loc_id,
const char *
name,
bool have_h5giterate_bug) {
677 octave_value obj = sloav_array_out();
679 return obj.load_hdf5(loc_id,
name, have_h5giterate_bug) && SWIG_IsOK(sloav_array_in(obj, &elemalloc, 0));
685%#
if SWIG_OCTAVE_PREREQ(4,0,0)
686 void print(std::ostream &os,
bool pr_as_read_syntax = false)
688 void print(std::ostream &os,
bool pr_as_read_syntax =
false) const
691 return sloav_array_out().print(os, pr_as_read_syntax);
698#define SLOAV_OBV_METH_FROM_CLASS_0(N, R) R N() const { return sloav_class.N(); }
699 SLOAV_OBV_METH_FROM_CLASS_0(is_all_va_args,
bool);
700 SLOAV_OBV_METH_FROM_CLASS_0(is_bool_matrix,
bool);
701 SLOAV_OBV_METH_FROM_CLASS_0(is_bool_scalar,
bool);
702 SLOAV_OBV_METH_FROM_CLASS_0(is_bool_type,
bool);
703 SLOAV_OBV_METH_FROM_CLASS_0(is_builtin_function,
bool);
704%#
if SWIG_OCTAVE_PREREQ(4,4,0)
705 SLOAV_OBV_METH_FROM_CLASS_0(iscell,
bool);
706 SLOAV_OBV_METH_FROM_CLASS_0(iscellstr,
bool);
708 SLOAV_OBV_METH_FROM_CLASS_0(is_cell,
bool);
709 SLOAV_OBV_METH_FROM_CLASS_0(is_cellstr,
bool);
711 SLOAV_OBV_METH_FROM_CLASS_0(is_char_matrix,
bool);
712 SLOAV_OBV_METH_FROM_CLASS_0(is_classdef_meta,
bool);
713 SLOAV_OBV_METH_FROM_CLASS_0(is_classdef_object,
bool);
714 SLOAV_OBV_METH_FROM_CLASS_0(is_classdef_superclass_ref,
bool);
715 SLOAV_OBV_METH_FROM_CLASS_0(is_complex_matrix,
bool);
716 SLOAV_OBV_METH_FROM_CLASS_0(is_complex_scalar,
bool);
717 SLOAV_OBV_METH_FROM_CLASS_0(is_complex_type,
bool);
718 SLOAV_OBV_METH_FROM_CLASS_0(is_constant,
bool);
719 SLOAV_OBV_METH_FROM_CLASS_0(is_cs_list,
bool);
720 SLOAV_OBV_METH_FROM_CLASS_0(is_defined,
bool);
721 SLOAV_OBV_METH_FROM_CLASS_0(is_diag_matrix,
bool);
722 SLOAV_OBV_METH_FROM_CLASS_0(is_dld_function,
bool);
723 SLOAV_OBV_METH_FROM_CLASS_0(is_double_type,
bool);
724 SLOAV_OBV_METH_FROM_CLASS_0(is_float_type,
bool);
725 SLOAV_OBV_METH_FROM_CLASS_0(is_function,
bool);
726 SLOAV_OBV_METH_FROM_CLASS_0(is_function_handle,
bool);
727 SLOAV_OBV_METH_FROM_CLASS_0(is_inline_function,
bool);
728 SLOAV_OBV_METH_FROM_CLASS_0(is_int16_type,
bool);
729 SLOAV_OBV_METH_FROM_CLASS_0(is_int32_type,
bool);
730 SLOAV_OBV_METH_FROM_CLASS_0(is_int64_type,
bool);
731 SLOAV_OBV_METH_FROM_CLASS_0(is_int8_type,
bool);
732 SLOAV_OBV_METH_FROM_CLASS_0(is_integer_type,
bool);
733 SLOAV_OBV_METH_FROM_CLASS_0(is_list,
bool);
734 SLOAV_OBV_METH_FROM_CLASS_0(is_magic_colon,
bool);
735 SLOAV_OBV_METH_FROM_CLASS_0(is_map,
bool);
736 SLOAV_OBV_METH_FROM_CLASS_0(is_matrix_type,
bool);
737 SLOAV_OBV_METH_FROM_CLASS_0(is_mex_function,
bool);
738 SLOAV_OBV_METH_FROM_CLASS_0(is_null_value,
bool);
739 SLOAV_OBV_METH_FROM_CLASS_0(is_numeric_type,
bool);
740 SLOAV_OBV_METH_FROM_CLASS_0(is_object,
bool);
741 SLOAV_OBV_METH_FROM_CLASS_0(is_perm_matrix,
bool);
742 SLOAV_OBV_METH_FROM_CLASS_0(is_range,
bool);
743 SLOAV_OBV_METH_FROM_CLASS_0(is_real_matrix,
bool);
744 SLOAV_OBV_METH_FROM_CLASS_0(is_real_nd_array,
bool);
745 SLOAV_OBV_METH_FROM_CLASS_0(is_real_scalar,
bool);
746 SLOAV_OBV_METH_FROM_CLASS_0(is_real_type,
bool);
747 SLOAV_OBV_METH_FROM_CLASS_0(is_scalar_type,
bool);
748 SLOAV_OBV_METH_FROM_CLASS_0(is_single_type,
bool);
749 SLOAV_OBV_METH_FROM_CLASS_0(is_sparse_type,
bool);
750 SLOAV_OBV_METH_FROM_CLASS_0(is_sq_string,
bool);
751 SLOAV_OBV_METH_FROM_CLASS_0(is_string,
bool);
752 SLOAV_OBV_METH_FROM_CLASS_0(is_true,
bool);
753 SLOAV_OBV_METH_FROM_CLASS_0(is_uint16_type,
bool);
754 SLOAV_OBV_METH_FROM_CLASS_0(is_uint32_type,
bool);
755 SLOAV_OBV_METH_FROM_CLASS_0(is_uint64_type,
bool);
756 SLOAV_OBV_METH_FROM_CLASS_0(is_uint8_type,
bool);
757 SLOAV_OBV_METH_FROM_CLASS_0(is_user_code,
bool);
758 SLOAV_OBV_METH_FROM_CLASS_0(is_user_function,
bool);
759 SLOAV_OBV_METH_FROM_CLASS_0(is_user_script,
bool);
760 SLOAV_OBV_METH_FROM_CLASS_0(isjava,
bool);
761 SLOAV_OBV_METH_FROM_CLASS_0(isobject,
bool);
762 SLOAV_OBV_METH_FROM_CLASS_0(isstruct,
bool);
763#undef SLOAV_OBV_METH_FROM_CLASS_0
768#define SLOAV_OBV_METH_FROM_ARRAY_0(N, R) R N() const { return sloav_array_out().N(); }
769#define SLOAV_OBV_METH_FROM_ARRAY_1(N, R, A) R N(A a) const { return sloav_array_out().N(a); }
770#define SLOAV_OBV_METH_FROM_ARRAY_2(N, R, A, B) R N(A a, B b) const { return sloav_array_out().N(a, b); }
771#define SLOAV_OBV_METH_FROM_ARRAY_3(N, R, A, B, C) R N(A a, B b, C c) const { return sloav_array_out().N(a, b, c); }
772#define SLOAV_OBV_METH_FROM_ARRAY_4(N, R, A, B, C, D) R N(A a, B b, C c, D d) const { return sloav_array_out().N(a, b, c, d); }
773#define SLOAV_OBV_METH_FROM_ARRAY_5(N, R, A, B, C, D, E) R N(A a, B b, C c, D d, E e) const { return sloav_array_out().N(a, b, c, d, e); }
774%#
if SWIG_OCTAVE_PREREQ(4,2,0)
775 SLOAV_OBV_METH_FROM_ARRAY_0(as_double, octave_value);
776 SLOAV_OBV_METH_FROM_ARRAY_0(as_single, octave_value);
778%#
if SWIG_OCTAVE_PREREQ(3,3,52)
779 SLOAV_OBV_METH_FROM_ARRAY_0(map_value, octave_map);
781 SLOAV_OBV_METH_FROM_ARRAY_0(map_value, Octave_map);
783 SLOAV_OBV_METH_FROM_ARRAY_0(abs, octave_value);
784 SLOAV_OBV_METH_FROM_ARRAY_0(acos, octave_value);
785 SLOAV_OBV_METH_FROM_ARRAY_0(
acosh, octave_value);
786 SLOAV_OBV_METH_FROM_ARRAY_0(angle, octave_value);
787 SLOAV_OBV_METH_FROM_ARRAY_0(arg, octave_value);
788 SLOAV_OBV_METH_FROM_ARRAY_0(asin, octave_value);
789 SLOAV_OBV_METH_FROM_ARRAY_0(asinh, octave_value);
790 SLOAV_OBV_METH_FROM_ARRAY_0(atan, octave_value);
791 SLOAV_OBV_METH_FROM_ARRAY_0(atanh, octave_value);
792 SLOAV_OBV_METH_FROM_ARRAY_0(byte_size,
size_t);
793 SLOAV_OBV_METH_FROM_ARRAY_0(ceil, octave_value);
794 SLOAV_OBV_METH_FROM_ARRAY_0(cell_value, Cell);
795 SLOAV_OBV_METH_FROM_ARRAY_0(cellstr_value, Array<std::string>);
796 SLOAV_OBV_METH_FROM_ARRAY_0(conj, octave_value);
797 SLOAV_OBV_METH_FROM_ARRAY_0(cos, octave_value);
798 SLOAV_OBV_METH_FROM_ARRAY_0(
cosh, octave_value);
799 SLOAV_OBV_METH_FROM_ARRAY_0(erf, octave_value);
800 SLOAV_OBV_METH_FROM_ARRAY_0(erfc, octave_value);
801 SLOAV_OBV_METH_FROM_ARRAY_0(exp, octave_value);
802 SLOAV_OBV_METH_FROM_ARRAY_0(expm1, octave_value);
803 SLOAV_OBV_METH_FROM_ARRAY_0(finite, octave_value);
804 SLOAV_OBV_METH_FROM_ARRAY_0(fix, octave_value);
805 SLOAV_OBV_METH_FROM_ARRAY_0(floor, octave_value);
806 SLOAV_OBV_METH_FROM_ARRAY_0(gamma, octave_value);
807 SLOAV_OBV_METH_FROM_ARRAY_0(imag, octave_value);
808 SLOAV_OBV_METH_FROM_ARRAY_0(index_vector, idx_vector);
809 SLOAV_OBV_METH_FROM_ARRAY_0(int16_array_value, int16NDArray);
810 SLOAV_OBV_METH_FROM_ARRAY_0(int16_scalar_value, octave_int16);
811 SLOAV_OBV_METH_FROM_ARRAY_0(int32_array_value, int32NDArray);
812 SLOAV_OBV_METH_FROM_ARRAY_0(int32_scalar_value, octave_int32);
813 SLOAV_OBV_METH_FROM_ARRAY_0(int64_array_value, int64NDArray);
814 SLOAV_OBV_METH_FROM_ARRAY_0(int64_scalar_value, octave_int64);
815 SLOAV_OBV_METH_FROM_ARRAY_0(int8_array_value, int8NDArray);
816 SLOAV_OBV_METH_FROM_ARRAY_0(int8_scalar_value, octave_int8);
817 SLOAV_OBV_METH_FROM_ARRAY_0(isinf, octave_value);
818 SLOAV_OBV_METH_FROM_ARRAY_0(isna, octave_value);
819 SLOAV_OBV_METH_FROM_ARRAY_0(isnan, octave_value);
820 SLOAV_OBV_METH_FROM_ARRAY_0(lgamma, octave_value);
821 SLOAV_OBV_METH_FROM_ARRAY_0(log, octave_value);
822 SLOAV_OBV_METH_FROM_ARRAY_0(log10, octave_value);
823 SLOAV_OBV_METH_FROM_ARRAY_0(log1p, octave_value);
824 SLOAV_OBV_METH_FROM_ARRAY_0(log2, octave_value);
825 SLOAV_OBV_METH_FROM_ARRAY_0(matrix_type, MatrixType);
826 SLOAV_OBV_METH_FROM_ARRAY_0(nnz, octave_idx_type);
827 SLOAV_OBV_METH_FROM_ARRAY_0(nzmax, octave_idx_type);
828 SLOAV_OBV_METH_FROM_ARRAY_0(perm_matrix_value, PermMatrix);
829 SLOAV_OBV_METH_FROM_ARRAY_0(range_value, Range);
830 SLOAV_OBV_METH_FROM_ARRAY_0(real, octave_value);
831 SLOAV_OBV_METH_FROM_ARRAY_0(round, octave_value);
832 SLOAV_OBV_METH_FROM_ARRAY_0(roundb, octave_value);
833 SLOAV_OBV_METH_FROM_ARRAY_0(signum, octave_value);
834 SLOAV_OBV_METH_FROM_ARRAY_0(sin, octave_value);
835 SLOAV_OBV_METH_FROM_ARRAY_0(sinh, octave_value);
836 SLOAV_OBV_METH_FROM_ARRAY_0(sqrt, octave_value);
837 SLOAV_OBV_METH_FROM_ARRAY_0(tan, octave_value);
838 SLOAV_OBV_METH_FROM_ARRAY_0(tanh, octave_value);
839 SLOAV_OBV_METH_FROM_ARRAY_0(uint16_array_value, uint16NDArray);
840 SLOAV_OBV_METH_FROM_ARRAY_0(uint16_scalar_value, octave_uint16);
841 SLOAV_OBV_METH_FROM_ARRAY_0(uint32_array_value, uint32NDArray);
842 SLOAV_OBV_METH_FROM_ARRAY_0(uint32_scalar_value, octave_uint32);
843 SLOAV_OBV_METH_FROM_ARRAY_0(uint64_array_value, uint64NDArray);
844 SLOAV_OBV_METH_FROM_ARRAY_0(uint64_scalar_value, octave_uint64);
845 SLOAV_OBV_METH_FROM_ARRAY_0(uint8_array_value, uint8NDArray);
846 SLOAV_OBV_METH_FROM_ARRAY_0(uint8_scalar_value, octave_uint8);
847 SLOAV_OBV_METH_FROM_ARRAY_0(xisalnum, octave_value);
848 SLOAV_OBV_METH_FROM_ARRAY_0(xisalpha, octave_value);
849 SLOAV_OBV_METH_FROM_ARRAY_0(xisascii, octave_value);
850 SLOAV_OBV_METH_FROM_ARRAY_0(xiscntrl, octave_value);
851 SLOAV_OBV_METH_FROM_ARRAY_0(xisdigit, octave_value);
852 SLOAV_OBV_METH_FROM_ARRAY_0(xisgraph, octave_value);
853 SLOAV_OBV_METH_FROM_ARRAY_0(xislower, octave_value);
854 SLOAV_OBV_METH_FROM_ARRAY_0(xisprint, octave_value);
855 SLOAV_OBV_METH_FROM_ARRAY_0(xispunct, octave_value);
856 SLOAV_OBV_METH_FROM_ARRAY_0(xisspace, octave_value);
857 SLOAV_OBV_METH_FROM_ARRAY_0(xisupper, octave_value);
858 SLOAV_OBV_METH_FROM_ARRAY_0(xisxdigit, octave_value);
859 SLOAV_OBV_METH_FROM_ARRAY_0(xtoascii, octave_value);
860 SLOAV_OBV_METH_FROM_ARRAY_0(xtolower, octave_value);
861 SLOAV_OBV_METH_FROM_ARRAY_0(xtoupper, octave_value);
862 SLOAV_OBV_METH_FROM_ARRAY_1(all, octave_value,
int);
863 SLOAV_OBV_METH_FROM_ARRAY_1(all_strings, string_vector,
bool);
864 SLOAV_OBV_METH_FROM_ARRAY_1(any, octave_value,
int);
865 SLOAV_OBV_METH_FROM_ARRAY_1(array_value, NDArray,
bool);
866 SLOAV_OBV_METH_FROM_ARRAY_1(bool_array_value, boolNDArray,
bool);
867 SLOAV_OBV_METH_FROM_ARRAY_1(bool_matrix_value, boolMatrix,
bool);
868 SLOAV_OBV_METH_FROM_ARRAY_1(bool_value,
bool,
bool);
869 SLOAV_OBV_METH_FROM_ARRAY_1(char_array_value, charNDArray,
bool);
870 SLOAV_OBV_METH_FROM_ARRAY_1(char_matrix_value, charMatrix,
bool);
871 SLOAV_OBV_METH_FROM_ARRAY_1(complex_array_value, ComplexNDArray,
bool);
872 SLOAV_OBV_METH_FROM_ARRAY_1(complex_diag_matrix_value, ComplexDiagMatrix,
bool);
873 SLOAV_OBV_METH_FROM_ARRAY_1(complex_matrix_value, ComplexMatrix,
bool);
874 SLOAV_OBV_METH_FROM_ARRAY_1(complex_value, Complex,
bool);
875 SLOAV_OBV_METH_FROM_ARRAY_1(diag, octave_value, octave_idx_type);
876 SLOAV_OBV_METH_FROM_ARRAY_1(diag_matrix_value, DiagMatrix,
bool);
877 SLOAV_OBV_METH_FROM_ARRAY_1(double_value,
double,
bool);
878 SLOAV_OBV_METH_FROM_ARRAY_1(float_array_value, FloatNDArray,
bool);
879 SLOAV_OBV_METH_FROM_ARRAY_1(float_complex_array_value, FloatComplexNDArray,
bool);
880 SLOAV_OBV_METH_FROM_ARRAY_1(float_complex_diag_matrix_value, FloatComplexDiagMatrix,
bool);
881 SLOAV_OBV_METH_FROM_ARRAY_1(float_complex_matrix_value, FloatComplexMatrix,
bool);
882 SLOAV_OBV_METH_FROM_ARRAY_1(float_complex_value, FloatComplex,
bool);
883 SLOAV_OBV_METH_FROM_ARRAY_1(float_diag_matrix_value, FloatDiagMatrix,
bool);
884 SLOAV_OBV_METH_FROM_ARRAY_1(float_matrix_value, FloatMatrix,
bool);
885 SLOAV_OBV_METH_FROM_ARRAY_1(float_value,
float,
bool);
886 SLOAV_OBV_METH_FROM_ARRAY_1(is_sorted, sortmode, sortmode);
887 SLOAV_OBV_METH_FROM_ARRAY_1(is_sorted_rows, sortmode, sortmode);
888 SLOAV_OBV_METH_FROM_ARRAY_1(matrix_value, Matrix,
bool);
889 SLOAV_OBV_METH_FROM_ARRAY_1(reshape, octave_value,
const dim_vector&);
890 SLOAV_OBV_METH_FROM_ARRAY_1(sort_rows_ids, Array<octave_idx_type>, sortmode);
891 SLOAV_OBV_METH_FROM_ARRAY_1(sparse_bool_matrix_value, SparseBoolMatrix,
bool);
892 SLOAV_OBV_METH_FROM_ARRAY_1(sparse_complex_matrix_value, SparseComplexMatrix,
bool);
893 SLOAV_OBV_METH_FROM_ARRAY_1(sparse_matrix_value, SparseMatrix,
bool);
894 SLOAV_OBV_METH_FROM_ARRAY_1(string_value, std::string,
bool);
895 SLOAV_OBV_METH_FROM_ARRAY_2(int_value,
int,
bool,
bool);
896 SLOAV_OBV_METH_FROM_ARRAY_2(long_value,
long int,
bool,
bool);
897 SLOAV_OBV_METH_FROM_ARRAY_2(permute, octave_value,
const Array<int>&,
bool);
898 SLOAV_OBV_METH_FROM_ARRAY_2(print_info,
void, std::ostream&,
bool);
899 SLOAV_OBV_METH_FROM_ARRAY_2(print_raw,
void, std::ostream&,
bool);
900 SLOAV_OBV_METH_FROM_ARRAY_2(resize, octave_value,
const dim_vector&,
bool);
901 SLOAV_OBV_METH_FROM_ARRAY_2(short_value,
short int,
bool,
bool);
902 SLOAV_OBV_METH_FROM_ARRAY_2(sort, octave_value, octave_idx_type, sortmode);
903 SLOAV_OBV_METH_FROM_ARRAY_2(uint_value,
unsigned int,
bool,
bool);
904 SLOAV_OBV_METH_FROM_ARRAY_2(ulong_value,
unsigned long int,
bool,
bool);
905 SLOAV_OBV_METH_FROM_ARRAY_2(ushort_value,
unsigned short int,
bool,
bool);
906 SLOAV_OBV_METH_FROM_ARRAY_3(convert_to_str_internal, octave_value,
bool,
bool,
char);
907 SLOAV_OBV_METH_FROM_ARRAY_3(sort, octave_value, Array<octave_idx_type>&, octave_idx_type, sortmode);
908 SLOAV_OBV_METH_FROM_ARRAY_5(write,
int, octave_stream&,
int, oct_data_conv::data_type,
int, oct_mach_info::float_format);
909#undef SLOAV_OBV_METH_FROM_ARRAY_0
910#undef SLOAV_OBV_METH_FROM_ARRAY_1
911#undef SLOAV_OBV_METH_FROM_ARRAY_2
912#undef SLOAV_OBV_METH_FROM_ARRAY_3
913#undef SLOAV_OBV_METH_FROM_ARRAY_4
914#undef SLOAV_OBV_METH_FROM_ARRAY_5
929%define %swiglal_oct_array_frags(ACFTYPE, INFRAG, OUTFRAG, INCALL, OUTCALL, OVCLASS, OVTYPE, OVVALUE, ISOVTYPEEXPR)
932%fragment(%swiglal_oct_array_view_init_frag(ACFTYPE),
"init") %{
933#if SWIG_OCTAVE_PREREQ(4,4,0)
935 octave::type_info& typeinfo = octave::interpreter::the_interpreter()->get_type_info();
936 string_vector types = typeinfo.installed_type_names();
937 bool register_octave_array_view_class =
true;
938 bool register_octave_swig_packed =
true;
939 for (
int i = 0; i < types.numel(); ++i) {
940 if (types(i) == %swiglal_oct_array_view_class(ACFTYPE)::static_type_name()) {
941 register_octave_array_view_class =
false;
944 if (register_octave_array_view_class) {
945 %swiglal_oct_array_view_class(ACFTYPE)::register_type();
949 %swiglal_oct_array_view_class(ACFTYPE)::register_type();
954%fragment(%swiglal_oct_array_view_frag(ACFTYPE),
"header",
955 fragment=%swiglal_oct_array_view_init_frag(ACFTYPE),
956 fragment=
"swiglal_oct_array_view", fragment=INFRAG, fragment=OUTFRAG)
963 class %swiglal_oct_array_view_helper_class(ACFTYPE) {
968 typedef OVCLASS OVClass;
969 typedef OVTYPE OVType;
972 static OVType ovvalue(octave_value& ov) {
977 static int incall(
const octave_value& parent, octave_value& objelem,
void *elemptr,
int *pelemalloc,
const size_t esize,
const bool isptr, swig_type_info *
const tinfo,
const int tflags)
983 static octave_value outcall(
const octave_value& parent,
const bool copyobj,
void *elemptr,
const size_t esize,
const bool isptr, swig_type_info *
const tinfo,
const int tflags) {
990 class OCTINTERP_API %swiglal_oct_array_view_class(ACFTYPE) : public %swiglal_oct_array_view_tmpl(ACFTYPE) {
995#if !SWIG_OCTAVE_PREREQ(4,0,0)
996 DECLARE_OCTAVE_ALLOCATOR;
998 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA;
1004 virtual ~%swiglal_oct_array_view_class(ACFTYPE)()
1007 %swiglal_oct_array_view_class(ACFTYPE)()
1008 : %swiglal_oct_array_view_tmpl(ACFTYPE)()
1011 %swiglal_oct_array_view_class(ACFTYPE)(
const octave_value& parent,
1015 const size_t dims[],
1016 const size_t strides[],
1018 swig_type_info* tinfo,
1020 : %swiglal_oct_array_view_tmpl(ACFTYPE)(parent, ptr, esize, ndims, dims, strides, isptr, tinfo, tflags)
1026#if !SWIG_OCTAVE_PREREQ(4,0,0)
1027 DEFINE_OCTAVE_ALLOCATOR(%swiglal_oct_array_view_class(ACFTYPE));
1029 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(%swiglal_oct_array_view_class(ACFTYPE),
1030 %swiglal_oct_array_view_ovtype(ACFTYPE),
1031 OVCLASS::static_class_name());
1038%fragment(%swiglal_array_copyin_frag(ACFTYPE),
"header",
1039 fragment=%swiglal_oct_array_view_frag(ACFTYPE))
1041 SWIGINTERN
int %swiglal_array_copyin_func(ACFTYPE)(
const octave_value& parent,
1047 const size_t dims[],
1048 const size_t strides[],
1050 swig_type_info *tinfo,
1055 %swiglal_oct_array_view_class(ACFTYPE) arrview(parent, ptr, esize, ndims, dims, strides, isptr, tinfo, tflags);
1056 return arrview.sloav_array_in(obj, pelemalloc, 0);
1061%fragment(%swiglal_array_copyout_frag(ACFTYPE),
"header",
1062 fragment=%swiglal_oct_array_view_frag(ACFTYPE))
1064 SWIGINTERN octave_value %swiglal_array_copyout_func(ACFTYPE)(
const octave_value& parent,
1068 const size_t dims[],
1069 const size_t strides[],
1071 swig_type_info *tinfo,
1076 %swiglal_oct_array_view_class(ACFTYPE) arrview(parent, ptr, esize, ndims, dims, strides, isptr, tinfo, tflags);
1077 return arrview.sloav_array_out(
true);
1082%fragment(%swiglal_array_viewin_frag(ACFTYPE),
"header",
1083 fragment=%swiglal_oct_array_view_frag(ACFTYPE))
1085 SWIGINTERN
int %swiglal_array_viewin_func(ACFTYPE)(
const octave_value& parent,
1092 swig_type_info *tinfo,
1098 return SWIG_MemoryError;
1102 OVTYPE val = obj.OVVALUE();
1107 dim_vector valdims = val.dims();
1109 if (valdims.length() > 2 || valdims.num_ones() == 0) {
1110 return SWIG_ValueError;
1113 else if (val.ndims() != %reinterpret_cast(ndims, octave_idx_type)) {
1114 return SWIG_ValueError;
1119 dims[0] = val.numel();
1121 for (
size_t i = 0; i < ndims; ++i) {
1122 dims[i] = valdims(i);
1128 return SWIG_TypeError;
1132 if (obj.type_name().find(
"swiglal_oct_array_view_") == 0) {
1133 return SWIG_TypeError;
1138 return SWIG_ValueError;
1142 if (!(ISOVTYPEEXPR)) {
1143 return SWIG_TypeError;
1147 if (val.byte_size() != val.numel() * esize) {
1148 return SWIG_TypeError;
1154 if (obj.is_complex_type() && !obj.is_scalar_type()) {
1155 if (obj.is_double_type()) {
1158 const ComplexNDArray t = obj.complex_array_value();
1159 *ptr = %reinterpret_cast(t.data(),
void*);
1160 c = *((Complex*) *ptr);
1162 if (c != *((Complex*) *ptr)) {
1163 return SWIG_UnknownError;
1165 }
else if (obj.is_single_type()) {
1168 const FloatComplexNDArray t = obj.float_complex_array_value();
1169 *ptr = %reinterpret_cast(t.data(),
void*);
1170 c = *((FloatComplex*) *ptr);
1172 if (c != *((FloatComplex*) *ptr)) {
1173 return SWIG_UnknownError;
1176 return SWIG_TypeError;
1179 *ptr = %reinterpret_cast(obj.mex_get_data(),
void*);
1182 return SWIG_ValueError;
1191%fragment(%swiglal_array_viewout_frag(ACFTYPE),
"header",
1192 fragment=%swiglal_oct_array_view_frag(ACFTYPE))
1194 SWIGINTERN octave_value %swiglal_array_viewout_func(ACFTYPE)(
const octave_value& parent,
1198 const size_t dims[],
1199 const size_t strides[],
1201 swig_type_info *tinfo,
1205 octave_base_value *objval =
new %swiglal_oct_array_view_class(ACFTYPE)(parent, ptr, esize, ndims, dims, strides, isptr, tinfo, tflags);
1206 return octave_value(objval);
1214%swiglal_oct_array_frags(SWIGTYPE,
"swiglal_as_SWIGTYPE",
"swiglal_from_SWIGTYPE",
1215 %arg(swiglal_as_SWIGTYPE(parent, objelem, elemptr, esize, isptr, tinfo, tflags)),
1216 %arg(swiglal_from_SWIGTYPE(parent, copyobj, elemptr, esize, isptr, tinfo, tflags)),
1217 octave_cell, Cell, cell_value,
false);
1221%swiglal_oct_array_frags(LALchar,
"SWIG_AsLALcharPtrAndSize",
"SWIG_FromLALcharPtr",
1222 %arg(SWIG_AsLALcharPtrAndSize(objelem, %reinterpret_cast(elemptr,
char**), 0, pelemalloc)),
1223 %arg(SWIG_FromLALcharPtr(*%reinterpret_cast(elemptr,
char**))),
1224 octave_cell, Cell, cell_value,
false);
1228%define %swiglal_oct_array_asvalfrom_frags(
TYPE, OVCLASS, OVTYPE, OVVALUE, ISOVTYPEEXPR)
1229%swiglal_oct_array_frags(
TYPE, SWIG_AsVal_frag(
TYPE), SWIG_From_frag(
TYPE),
1230 %arg(SWIG_AsVal(
TYPE)(objelem, %reinterpret_cast(elemptr,
TYPE*))),
1231 %arg(SWIG_From(
TYPE)(*%reinterpret_cast(elemptr,
TYPE*))),
1232 OVCLASS, OVTYPE, OVVALUE, ISOVTYPEEXPR);
1236%swiglal_oct_array_asvalfrom_frags(int8_t, octave_int8_matrix, intNDArray<octave_int<int8_t> >, int8_array_value, obj.is_int8_type());
1237%swiglal_oct_array_asvalfrom_frags(uint8_t, octave_uint8_matrix, intNDArray<octave_int<uint8_t> >, uint8_array_value, obj.is_uint8_type());
1238%swiglal_oct_array_asvalfrom_frags(int16_t, octave_int16_matrix, intNDArray<octave_int<int16_t> >, int16_array_value, obj.is_int16_type());
1239%swiglal_oct_array_asvalfrom_frags(uint16_t, octave_uint16_matrix, intNDArray<octave_int<uint16_t> >, uint16_array_value, obj.is_uint16_type());
1240%swiglal_oct_array_asvalfrom_frags(int32_t, octave_int32_matrix, intNDArray<octave_int<int32_t> >, int32_array_value, obj.is_int32_type());
1241%swiglal_oct_array_asvalfrom_frags(uint32_t, octave_uint32_matrix, intNDArray<octave_int<uint32_t> >, uint32_array_value, obj.is_uint32_type());
1242%swiglal_oct_array_asvalfrom_frags(int64_t, octave_int64_matrix, intNDArray<octave_int<int64_t> >, int64_array_value, obj.is_int64_type());
1243%swiglal_oct_array_asvalfrom_frags(uint64_t, octave_uint64_matrix, intNDArray<octave_int<uint64_t> >, uint64_array_value, obj.is_uint64_type());
1246%swiglal_oct_array_asvalfrom_frags(
float, octave_float_matrix, FloatMatrix, float_matrix_value, obj.is_real_type() && obj.is_single_type());
1247%swiglal_oct_array_asvalfrom_frags(
double, octave_matrix, Matrix, matrix_value, obj.is_real_type() && obj.is_double_type());
1250%swiglal_oct_array_asvalfrom_frags(gsl_complex_float, octave_float_complex_matrix, FloatComplexMatrix, float_complex_matrix_value, obj.is_complex_type() && obj.is_single_type());
1251%swiglal_oct_array_asvalfrom_frags(gsl_complex, octave_complex_matrix, ComplexMatrix, complex_matrix_value, obj.is_complex_type() && obj.is_double_type());
1252%swiglal_oct_array_asvalfrom_frags(
COMPLEX8, octave_float_complex_matrix, FloatComplexMatrix, float_complex_matrix_value, obj.is_complex_type() && obj.is_single_type());
1253%swiglal_oct_array_asvalfrom_frags(
COMPLEX16, octave_complex_matrix, ComplexMatrix, complex_matrix_value, obj.is_complex_type() && obj.is_double_type());
#define gmtime_r(timep, result)
static REAL8TimeSeries * error(const REAL8TimeSeries *s1, const REAL8TimeSeries *s0)
#define crect(re, im)
Construct a COMPLEX16 from real and imaginary parts.
double complex COMPLEX16
Double-precision floating-point complex number (16 bytes total)
#define crectf(re, im)
Construct a COMPLEX8 from real and imaginary parts.
float complex COMPLEX8
Single-precision floating-point complex number (8 bytes total)