24 #if defined (HAVE_CONFIG_H) 54 size_t pos =
s.find_last_not_of (
' ');
56 s = (pos == std::string::npos) ?
"" :
s.substr (0, pos+1);
96 size_t pos =
s.find_last_not_of (
' ');
98 s = (pos == std::string::npos) ?
"" :
s.substr (0, pos+1);
115 if (!
elem(
i).is_string ())
195 for (
k = 0;
k < n;
k++)
196 iv(
k) = idx_arg(
k).index_vector ();
206 e.set_pos_if_unset (n,
k+1);
232 ra_idx(
i) = idx_arg(
i).index_vector ();
237 e.set_pos (len,
i+1);
256 ra_idx.xelem (
i) = idx_arg(
i).index_vector ();
261 e.set_pos (len,
i+1);
286 error (
"Cell::column: requires 2-D cell array");
288 if (i < 0 || i >=
cols ())
289 error (
"invalid column selection");
330 r[
i] = ((
p++)->*
fcn) ();
octave_idx_type rows(void) const
Cell index(const octave_value_list &idx, bool resize_ok=false) const
const octave_base_value const Array< octave_idx_type > & ra_idx
std::string string_value(bool force=false) const
Cell diag(octave_idx_type k=0) const
const T * data(void) const
void delete_elements(const idx_vector &i)
Deleting elements.
string_vector string_vector_value(void) const
const octave_value * fortran_vec(void) const
void assign(const octave_value_list &idx, const Cell &rhs, const octave_value &fill_val=Matrix())
void error(const char *fmt,...)
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
Cell map(ctype_mapper) const
octave_value & elem(octave_idx_type n)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
octave_idx_type cols(void) const
Array< T > & insert(const Array< T > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
octave_value resize(const dim_vector &dv, bool fill=false) const
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
Array< T > index(const idx_vector &i) const
Indexing without resizing.
bool iscellstr(void) const
void resize(const dim_vector &dv, const octave_value &rfv)
Cell concat(const Cell &rb, const Array< octave_idx_type > &ra_idx)
Cell & insert(const Cell &a, octave_idx_type r, octave_idx_type c)
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
void err_wrong_type_arg(const char *name, const char *s)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
N Dimensional Array with copy-on-write semantics.
Array< std::string > cellstr_value(void) const
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
void delete_elements(const octave_value_list &idx)
octave_idx_type nnz(void) const
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
octave_idx_type length(void) const
void assign(const idx_vector &i, const Array< T > &rhs, const T &rfv)
Indexed assignment (always with resize & fill).
Cell column(octave_idx_type i) const
octave_idx_type numel(void) const
Number of elements in the array.
octave_value resize_fill_value(void) const
Vector representing the dimensions (size) of an Array.
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