25 #if defined (HAVE_CONFIG_H) 79 #if defined (HAVE_ZLIB) 83 #define READ_PAD(is_small_data_element, l) ((is_small_data_element) ? 4 : (((l)+7)/8)*8) 84 #define PAD(l) (((l) > 0 && (l) <= 4) ? 4 : (((l)+7)/8)*8) 85 #define INT8(l) ((l) == miINT8 || (l) == miUINT8 || (l) == miUTF8) 254 template <
typename T>
260 #define READ_INTEGER_DATA(TYPE, swap, data, size, len, stream) \ 265 OCTAVE_LOCAL_BUFFER (TYPE, ptr, len); \ 266 std::streamsize n_bytes = size * static_cast<std::streamsize> (len); \ 267 stream.read (reinterpret_cast<char *> (ptr), n_bytes); \ 269 swap_bytes< size > (ptr, len); \ 270 for (octave_idx_type i = 0; i < len; i++) \ 322 #undef READ_INTEGER_DATA 371 #define OCTAVE_MAT5_INTEGER_READ(TYP) \ 375 std::streampos tmp_pos; \ 377 if (read_mat5_tag (is, swap, type, len, is_small_data_element)) \ 378 error ("load: reading matrix data for '%s'", retval.c_str ()); \ 380 octave_idx_type n = re.numel (); \ 381 tmp_pos = is.tellg (); \ 382 read_mat5_integer_data (is, re.fortran_vec (), n, swap, \ 383 static_cast<enum mat5_data_type> (type)); \ 386 error ("load: reading matrix data for '%s'", retval.c_str ()); \ 388 is.seekg (tmp_pos + static_cast<std::streamoff> \ 389 (READ_PAD (is_small_data_element, len))); \ 396 if (read_mat5_tag (is, swap, type, len, is_small_data_element)) \ 397 error ("load: reading matrix data for '%s'", \ 401 read_mat5_binary_data (is, im.fortran_vec (), n, swap, \ 402 static_cast<enum mat5_data_type> (type), flt_fmt); \ 405 error ("load: reading imaginary matrix data for '%s'", \ 408 ComplexNDArray ctmp (dims); \ 410 for (octave_idx_type i = 0; i < n; i++) \ 411 ctmp(i) = Complex (re(i).double_value (), im(i)); \ 425 bool& is_small_data_element)
430 if (!
is.read (reinterpret_cast<char *> (&temp), 4))
436 upper = (temp >> 16) & 0xffff;
437 type = temp & 0xffff;
443 is_small_data_element =
true;
447 if (!
is.read (reinterpret_cast<char *> (&temp), 4))
452 is_small_data_element =
false;
461 is.read (reinterpret_cast<char *> (&
val), 4);
488 bool isclass =
false;
495 bool flt_fmt_is_big_endian
501 if ((flt_fmt_is_big_endian && !
swap) || (! flt_fmt_is_big_endian &&
swap))
508 int32_t element_length;
509 bool is_small_data_element;
515 #if defined (HAVE_ZLIB) 522 is.read (inbuf, element_length);
528 if (uncompress (reinterpret_cast<Bytef *> (
tmp), &destLen,
529 reinterpret_cast<Bytef *> (inbuf), element_length)
531 error (
"load: error probing size of compressed data element");
537 destLen =
tmp[1] + 8;
542 int err = uncompress (reinterpret_cast<Bytef *>
543 (const_cast<char *> (outbuf.c_str ())),
544 &destLen,
reinterpret_cast<Bytef *
> (inbuf),
565 msg =
"stream error";
580 case Z_VERSION_ERROR:
581 msg =
"version error";
585 error (
"load: error uncompressing data element (%s from zlib)",
590 std::istringstream gz_is (outbuf);
607 error (
"load: invalid element type = %d",
type);
610 if (element_length == 0)
621 ||
type !=
miUINT32 || len != 8 || is_small_data_element)
622 error (
"load: invalid array flags subelement");
627 imag = (flags & 0x0800) != 0;
629 global = (flags & 0x0400) != 0;
631 logicalvar = (flags & 0x0200) != 0;
646 error (
"load: invalid dimensions array subelement");
648 int ndims = dim_len / 4;
665 std::streampos tmp_pos =
is.tellg ();
666 is.seekg (tmp_pos + static_cast<std::streamoff>
667 (
READ_PAD (is_small_data_element, dim_len) - dim_len));
679 error (
"load: invalid array name subelement");
686 std::streampos tmp_pos =
is.tellg ();
690 if (!
is.read (
name, len))
691 goto data_read_error;
693 is.seekg (tmp_pos + static_cast<std::streamoff>
694 (
READ_PAD (is_small_data_element, len)));
717 error (
"load: reading cell data for '%s'",
nm.c_str ());
753 std::streampos tmp_pos;
756 error (
"load: reading sparse row data for '%s'",
retval.c_str ());
758 tmp_pos =
is.tellg ();
761 static_cast<enum mat5_data_type> (
type));
764 error (
"load: reading sparse row data for '%s'",
retval.c_str ());
766 is.seekg (tmp_pos + static_cast<std::streamoff>
767 (
READ_PAD (is_small_data_element, len)));
771 error (
"load: reading sparse column data for '%s'",
774 tmp_pos =
is.tellg ();
777 static_cast<enum mat5_data_type> (
type));
780 error (
"load: reading sparse column data for '%s'",
783 is.seekg (tmp_pos + static_cast<std::streamoff>
784 (
READ_PAD (is_small_data_element, len)));
788 error (
"load: reading sparse matrix data for '%s'",
799 tmp_pos =
is.tellg ();
801 static_cast<enum mat5_data_type> (
type),
805 error (
"load: reading sparse matrix data for '%s'",
808 is.seekg (tmp_pos + static_cast<std::streamoff>
809 (
READ_PAD (is_small_data_element, len)));
817 error (
"load: reading sparse matrix data for '%s'",
825 error (
"load: reading imaginary sparse matrix data for '%s'",
845 goto data_read_error;
857 if (ftype ==
"simple" || ftype ==
"scopedfunction")
867 if ((fpath.length () >= mroot.length ())
868 && fpath.substr (0, mroot.length ()) == mroot
881 + fpath.substr (mroot.length ()));
901 std::list<std::string> names;
902 names.push_back (
fname +
".oct");
903 names.push_back (
fname +
".mex");
904 names.push_back (
fname +
".m");
926 warning (
"load: can't find the file %s",
947 warning (
"load: can't find the file %s",
954 else if (ftype ==
"nested")
956 warning (
"load: can't load nested function");
959 else if (ftype ==
"anonymous")
993 p0 != m2.
end (); p0++)
1006 if (parse_status != 0)
1007 error (
"load: failed to load anonymous function handle");
1013 error (
"load: failed to load anonymous function handle");
1020 error (
"load: invalid function handle type");
1030 for (
int i = 0;
i < n_fields;
i++)
1036 error (
"load: invalid field name subelement");
1040 std::streampos tmp_pos =
is.tellg ();
1044 if (!
is.read (elname, fn_len))
1045 goto data_read_error;
1047 is.seekg (tmp_pos + static_cast<std::streamoff>
1048 (
READ_PAD (is_small_data_element, fn_len)));
1051 elname[fn_len] =
'\0';
1056 std::vector<Cell> elt (n_fields);
1068 if (field(
i) ==
"MCOS")
1074 goto data_read_error;
1076 elt[
i](j) = fieldtc;
1095 error (
"load: invalid class name");
1100 std::streampos tmp_pos =
is.tellg ();
1104 if (!
is.read (
name, len))
1105 goto data_read_error;
1107 is.seekg (tmp_pos + static_cast<std::streamoff>
1108 (
READ_PAD (is_small_data_element, len)));
1122 int32_t field_name_length;
1130 error (
"load: invalid field name length subelement");
1132 if (!
is.read (reinterpret_cast<char *> (&field_name_length), fn_len))
1133 goto data_read_error;
1142 error (
"load: invalid field name subelement");
1148 fn_len =
READ_PAD (is_small_data_element, fn_len);
1152 if (!
is.read (elname, fn_len))
1153 goto data_read_error;
1155 std::vector<Cell> elt (n_fields);
1170 elt[
i](j) = fieldtc;
1176 const char *key = elname +
i*field_name_length;
1184 if (classname ==
"inline")
1200 warning (
"load: classdef element has been converted to a struct");
1206 std::list<std::string> ());
1212 warning (
"load: unable to reconstruct object inheritance");
1226 catch (
const octave::execution_exception&)
1228 goto data_read_error;
1235 warning (
"load: element has been converted to a structure");
1264 out(
i) = in(
i).bool_value ();
1301 std::streampos tmp_pos;
1304 error (
"load: reading matrix data for '%s'",
retval.c_str ());
1307 tmp_pos =
is.tellg ();
1313 error (
"load: reading matrix data for '%s'",
retval.c_str ());
1315 is.seekg (tmp_pos + static_cast<std::streamoff>
1316 (
READ_PAD (is_small_data_element, len)));
1325 error (
"load: reading matrix data for '%s'",
retval.c_str ());
1333 error (
"load: reading imaginary matrix data for '%s'",
1358 std::streampos tmp_pos;
1361 error (
"load: reading matrix data for '%s'",
retval.c_str ());
1364 tmp_pos =
is.tellg ();
1370 error (
"load: reading matrix data for '%s'",
retval.c_str ());
1372 is.seekg (tmp_pos + static_cast<std::streamoff>
1373 (
READ_PAD (is_small_data_element, len)));
1384 out (
i) =
static_cast<bool> (re (
i));
1395 error (
"load: reading matrix data for '%s'",
retval.c_str ());
1403 error (
"load: reading imaginary matrix data for '%s'",
1419 bool found_big_char =
false;
1425 found_big_char =
true;
1430 warning (
"load: can not read non-ASCII portions of UTF characters; replacing unreadable characters with '?'");
1437 bool utf8_multi_byte =
false;
1440 unsigned char a =
static_cast<unsigned char> (re(
i));
1442 utf8_multi_byte =
true;
1445 if (utf8_multi_byte)
1447 warning (
"load: can not read multi-byte encoded UTF8 characters; replacing unreadable characters with '?'");
1451 =
static_cast<unsigned char> (re(
i));
1466 is.seekg (pos + static_cast<std::streamoff> (element_length));
1475 error (
"load: trouble reading binary file '%s'",
filename.c_str ());
1479 is.seekg (pos + static_cast<std::streamoff> (element_length));
1487 int16_t version = 0;
1489 uint64_t subsys_offset;
1491 is.seekg (116, std::ios::beg);
1492 is.read (reinterpret_cast<char *> (&subsys_offset), 8);
1494 is.seekg (124, std::ios::beg);
1495 is.read (reinterpret_cast<char *> (&version), 2);
1496 is.read (reinterpret_cast<char *> (&magic), 2);
1498 if (magic == 0x4d49)
1500 else if (magic == 0x494d)
1505 error (
"load: can't read binary file");
1511 version = ((version >> 8) & 0xff) + ((version & 0xff) << 8);
1513 if (version != 1 && ! quiet)
1514 warning (
"load: found version %d binary MAT file, " 1515 "but only prepared for version 1", version);
1520 if (subsys_offset != 0x2020202020202020ULL && subsys_offset != 0ULL)
1523 is.seekg (subsys_offset, std::ios::beg);
1541 char *ctmp =
const_cast<char *
> (outbuf.c_str ());
1543 ctmp[j-8] = itmp(j).char_value ();
1545 std::istringstream fh_ws (outbuf);
1556 is.seekg (128, std::ios::beg);
1567 if (bytes > 0 && bytes <= 4)
1568 temp = (bytes << 16) +
type;
1572 if (!
is.write (reinterpret_cast<char *> (&temp), 4))
1577 if (!
is.write (reinterpret_cast<char *> (&temp), 4))
1586 #define MAT5_DO_WRITE(TYPE, data, count, stream) \ 1589 OCTAVE_LOCAL_BUFFER (TYPE, ptr, count); \ 1590 for (octave_idx_type i = 0; i < count; i++) \ 1591 ptr[i] = static_cast<TYPE> (data[i]); \ 1592 std::streamsize n_bytes = sizeof (TYPE) * static_cast<std::streamsize> (count); \ 1593 stream.write (reinterpret_cast<char *> (ptr), n_bytes); \ 1603 const double *data = m.
data ();
1609 warning (
"save: some values too large to save as floats --");
1610 warning (
"save: saving as doubles instead");
1616 double max_val, min_val;
1680 os.
write (reinterpret_cast<const char *> (data), len);
1684 error (
"unrecognized data format requested");
1688 if (
PAD (len) > len)
1690 static char buf[9]=
"\x00\x00\x00\x00\x00\x00\x00\x00";
1699 const float *data = m.
data ();
1701 float max_val, min_val;
1761 os.
write (reinterpret_cast<const char *> (data), len);
1769 error (
"unrecognized data format requested");
1773 if (
PAD (len) > len)
1775 static char buf[9]=
"\x00\x00\x00\x00\x00\x00\x00\x00";
1780 template <
typename T>
1824 os.
write (reinterpret_cast<const char *> (m), len);
1826 if (
PAD (len) > len)
1828 static char buf[9]=
"\x00\x00\x00\x00\x00\x00\x00\x00";
1900 bool too_large_for_float =
false;
1908 too_large_for_float =
true;
1913 if (! too_large_for_float)
1958 return 8 + nel *
size;
2014 return PAD ((nel > 0 && nel *
size <= 4 ? 4 : 8) + nel *
size);
2066 size_t max_namelen = 63;
2067 size_t len =
name.length ();
2072 ret +=
PAD (len > max_namelen ? max_namelen : len);
2080 if (chm.
numel () > 2)
2093 ret +=
PAD (
nnz *
sizeof (int32_t));
2095 ret +=
PAD ((nc + 1) *
sizeof (int32_t));
2105 ret +=
PAD (
nnz *
sizeof (int32_t));
2107 ret +=
PAD ((nc + 1) *
sizeof (int32_t));
2111 #define INT_LEN(nel, size) \ 2114 octave_idx_type sz = nel * size; \ 2119 else if (cname ==
"int8")
2121 else if (cname ==
"int16")
2123 else if (cname ==
"int32")
2125 else if (cname ==
"int64")
2127 else if (cname ==
"uint8")
2129 else if (cname ==
"uint16")
2131 else if (cname ==
"uint32")
2133 else if (cname ==
"uint64")
2157 for (
int i = 0;
i < nel;
i++)
2184 ret += 8 +
PAD (6 > max_namelen ? max_namelen : 6);
2187 size_t classlen = tc.
class_name ().length ();
2189 ret += 8 +
PAD (classlen > max_namelen ? max_namelen : classlen);
2195 ret += 16 + fieldcnt * (max_namelen + 1);
2220 int tmp =
sizeof (int32_t);
2225 tmp_idx[
i] = idx[
i];
2233 warning (
"save: skipping %s: dimension too large for MAT format",
2243 bool mark_global,
bool mat7_format,
2249 size_t max_namelen = 63;
2252 int nd = tc.
ndims ();
2257 for (
int i = 0;
i < nd;
i++)
2259 if (
dv(
i) > max_dim_val)
2284 if (
nnz > max_dim_val || nc + 1 > max_dim_val)
2292 else if (
dv.
numel () > max_dim_val)
2298 #if defined (HAVE_ZLIB) 2300 if (mat7_format && ! compressing)
2304 std::ostringstream buf;
2316 uLongf srcLen = buf_str.length ();
2317 uLongf destLen = srcLen * 101 / 100 + 12;
2320 if (compress (reinterpret_cast<Bytef *> (out_buf), &destLen,
2321 reinterpret_cast<const Bytef *> (buf_str.c_str ()),
2324 error (
"save: error compressing data element");
2327 static_cast<octave_idx_type> (destLen));
2337 octave_unused_parameter (compressing);
2358 else if (cname ==
"int8")
2360 else if (cname ==
"int16")
2362 else if (cname ==
"int32")
2364 else if (cname ==
"int64")
2366 else if (cname ==
"uint8" || tc.
islogical ())
2368 else if (cname ==
"uint16")
2370 else if (cname ==
"uint32")
2372 else if (cname ==
"uint64")
2394 error (
"save: error while writing '%s' to MAT file",
name.c_str ());
2397 os.
write (reinterpret_cast<char *> (&flags), 4);
2402 os.
write (reinterpret_cast<char *> (&nnz_32), 4);
2406 for (
int i = 0;
i < nd;
i++)
2409 os.
write (reinterpret_cast<char *> (&n), 4);
2412 if (
PAD (dim_len) > dim_len)
2414 static char buf[9]=
"\x00\x00\x00\x00\x00\x00\x00\x00";
2420 size_t namelen =
name.length ();
2422 if (namelen > max_namelen)
2423 namelen = max_namelen;
2425 int paddedlength =
PAD (namelen);
2429 memset (paddedname, 0, paddedlength);
2430 strncpy (paddedname,
name.c_str (), namelen);
2431 os.
write (paddedname, paddedlength);
2445 const char *
s = chm.
data ();
2448 buf[
i] = *
s++ & 0x00FF;
2450 os.
write (reinterpret_cast<char *> (buf), len);
2452 if (paddedlength > len)
2454 static char padbuf[9]=
"\x00\x00\x00\x00\x00\x00\x00\x00";
2455 os.
write (padbuf, paddedlength - len);
2494 for (
int i = 0;
i <
nnz;
i++)
2500 else if (cname ==
"int8")
2506 else if (cname ==
"int16")
2512 else if (cname ==
"int32")
2518 else if (cname ==
"int64")
2524 else if (cname ==
"uint8")
2530 else if (cname ==
"uint16")
2536 else if (cname ==
"uint32")
2542 else if (cname ==
"uint64")
2574 error (
"save: error while writing '%s' to MAT file",
name.c_str ());
2598 size_t namelen = classname.length ();
2600 if (namelen > max_namelen)
2601 namelen = max_namelen;
2603 int paddedlength =
PAD (namelen);
2607 memset (paddedname, 0, paddedlength);
2608 strncpy (paddedname, classname.c_str (), namelen);
2609 os.
write (paddedname, paddedlength);
2623 m =
tmp(0).map_value ();
2625 catch (
const octave::execution_exception&)
2627 error (
"save: error while writing '%s' to MAT file",
2638 int32_t maxfieldnamelength = max_namelen + 1;
2643 os.
write (reinterpret_cast<char *> (&maxfieldnamelength), 4);
2655 memset (buf, 0, max_namelen + 1);
2657 strncpy (buf, key.c_str (), max_namelen);
2658 os.
write (buf, max_namelen + 1);
2665 std::vector<const octave_value *> elts (nf);
2682 error (
"save: error while writing '%s' to MAT file",
octave_idx_type write(const octave_value &data, octave_idx_type block_size, oct_data_conv::data_type output_type, octave_idx_type skip, mach_info::float_format flt_fmt)
OCTINTERP_API octave_value_list feval(const std::string &name, const octave_value_list &args=octave_value_list(), int nargout=0)
octave_value fcn_val(void) const
bool all_integers(float &max_val, float &min_val) const
#define INT_LEN(nel, size)
void assign(const std::string &name, const octave_value &value, bool force_add)
static void read_int(std::istream &is, bool swap, int32_t &val)
std::string string_value(bool force=false) const
string_vector keys(void) const
std::string system_path(void) const
void assign(const std::string &k, const Cell &val)
const T * data(void) const
bool islogical(void) const
octave_map map_value(void) const
std::string dir_sep_chars(void)
identity matrix If supplied two scalar respectively For allows like xample val
bool is_real_matrix(void) const
save_type get_save_type(double, double)
static void read_mat5_binary_data(std::istream &is, double *data, octave_idx_type count, bool swap, mat5_data_type type, octave::mach_info::float_format flt_fmt)
octave_idx_type * cidx(void)
const T * fortran_vec(void) const
int32NDArray int32_array_value(void) const
void swap_bytes< 8 >(void *ptr)
OCTINTERP_API octave_value load_fcn_from_file(const std::string &file_name, const std::string &dir_name="", const std::string &dispatch_type="", const std::string &package_name="", const std::string &fcn_name="", bool autoload=false)
bool is_complex_scalar(void) const
void error(const char *fmt,...)
std::string octave_exec_home(void)
static octave_value subsys_ov
octave::mach_info::float_format flt_fmt
bool is_defined(void) const
const_iterator end(void) const
cdef_manager & __get_cdef_manager__(const std::string &who)
std::string read_mat5_binary_element(std::istream &is, const std::string &filename, bool swap, bool &global, octave_value &tc)
void read_floats(std::istream &is, float *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
bool too_large_for_float(void) const
FloatNDArray float_array_value(bool frc_str_conv=false) const
#define MAT5_DO_WRITE(TYPE, data, count, stream)
bool isobject(void) const
std::string find_method(const std::string &class_name, const std::string &meth, std::string &dir_name, const std::string &pack_name="")
static void write_mat5_array(std::ostream &os, const NDArray &m, bool save_as_floats)
void push(octave_function *fcn)
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
uint32NDArray uint32_array_value(void) const
charNDArray char_array_value(bool frc_str_conv=false) const
octave_idx_type nnz(void) const
Actual number of nonzero terms.
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
int16NDArray int16_array_value(void) const
symbol_table & __get_symbol_table__(const std::string &who)
nd deftypefn *std::string name
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
void swap_bytes< 4 >(void *ptr)
#define READ_INTEGER_DATA(TYPE, swap, data, size, len, stream)
bool reconstruct_parents(void)
OCTINTERP_API octave_value_list eval_string(const std::string &, bool silent, int &parse_status, int nargout)
#define READ_PAD(is_small_data_element, l)
void read_doubles(std::istream &is, double *data, save_type type, octave_idx_type len, bool swap, octave::mach_info::float_format fmt)
void write_mat5_integer_data(std::ostream &os, const T *m, int size, octave_idx_type nel)
octave_idx_type nzmax(void) const
Amount of storage for nonzero elements.
bool is_single_type(void) const
float_format native_float_format(void)
void read_mat5_integer_data(std::istream &is, T *m, octave_idx_type count, bool swap, mat5_data_type type)
const_iterator end(void) const
dim_vector dims(void) const
bool save_mat5_binary_element(std::ostream &os, const octave_value &tc, const std::string &name, bool mark_global, bool mat7_format, bool save_as_floats, bool compressing)
bool all_integers(double &max_val, double &min_val) const
const_iterator begin(void) const
bool issparse(void) const
uint64NDArray uint64_array_value(void) const
bool is_complex_matrix(void) const
static void write_mat5_sparse_index_vector(std::ostream &os, const octave_idx_type *idx, octave_idx_type nel)
octave_idx_type * ridx(void)
const Cell & contents(const_iterator p) const
std::string class_name(void) const
int read_mat5_binary_file_header(std::istream &is, bool &swap, bool quiet, const std::string &filename)
static int write_mat5_tag(std::ostream &is, int type, octave_idx_type bytes)
bool isstruct(void) const
std::string key(const_iterator p) const
static bool write_mat5_cell_array(std::ostream &os, const Cell &cell, bool mark_global, bool save_as_floats)
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
load_path & __get_load_path__(const std::string &who)
int save_mat5_element_length(const octave_value &tc, const std::string &name, bool save_as_floats, bool mat7_format)
octave_idx_type numel(void) const
octave_value convert_to_str(bool pad=false, bool force=false, char type='\'') const
FloatComplexNDArray float_complex_array_value(bool frc_str_conv=false) const
cdef_class find_class(const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
octave_idx_type nfields(void) const
void warning(const char *fmt,...)
octave::unwind_protect frame
static void warn_dim_too_large(const std::string &name)
octave_idx_type cols(void) const
charNDArray max(char d, const charNDArray &m)
octave_scalar_map scalar_map_value(void) const
boolNDArray bool_array_value(bool warn=false) const
octave_fcn_handle * fcn_handle_value(bool silent=false) const
const octave_value & contents(const_iterator p) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
octave_idx_type nnz(void) const
uint16NDArray uint16_array_value(void) const
call_stack & __get_call_stack__(const std::string &who)
static octave_value make_fcn_handle(octave_builtin::fcn ff, const std::string &nm)
#define OCTAVE_MAT5_INTEGER_READ(TYP)
void warn_wrong_type_arg(const char *name, const octave_value &tc)
int64NDArray int64_array_value(void) const
int8NDArray int8_array_value(void) const
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
octave::sys::file_stat fs(filename)
void add_method(T *obj, void(T::*method)(void))
static int read_mat5_tag(std::istream &is, bool swap, int32_t &type, int32_t &bytes, bool &is_small_data_element)
bool iscomplex(void) const
ColumnVector imag(const ComplexColumnVector &a)
void set_scope(const symbol_scope &sid)
bool is_string(void) const
std::complex< float > FloatComplex
OCTAVE_EXPORT octave_value_list error nd deftypefn *const octave_scalar_map err
std::complex< double > Complex
octave_fields::const_iterator const_iterator
bool is_range(void) const
bool reconstruct_exemplar(void)
octave_idx_type numel(void) const
Number of elements in the array.
ColumnVector real(const ComplexColumnVector &a)
octave_idx_type nfields(void) const
write the output to stdout if nargout is
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
Vector representing the dimensions (size) of an Array.
const_iterator begin(void) const
bool is_uint8_type(void) const
void err_disabled_feature(const std::string &fcn, const std::string &feature, const std::string &pkg)
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
bool is_real_scalar(void) const
Cell cell_value(void) const
NDArray array_value(bool frc_str_conv=false) const
octave_idx_type nzmax(void) const
uint8NDArray uint8_array_value(void) const
bool is_inline_function(void) const
int save_mat5_array_length(const double *val, octave_idx_type nel, bool save_as_floats)