26 #if defined (HAVE_CONFIG_H)
52 std::string s = sv[i];
56 std::size_t pos = s.find_last_not_of (
' ');
58 s = (pos == std::string::npos) ?
"" : s.substr (0, pos+1);
89 const std::string *src = sa.
data ();
111 std::string s = sv[i];
115 std::size_t pos = s.find_last_not_of (
' ');
117 s = (pos == std::string::npos) ?
"" : s.substr (0, pos+1);
134 if (!
elem(i).is_string ())
215 for (k = 0; k <
n; k++)
216 iv(k) = idx_arg(k).index_vector ();
223 catch (octave::index_exception& ie)
226 ie.set_pos_if_unset (
n, k+1);
254 ra_idx(i) = idx_arg(i).index_vector ();
256 catch (octave::index_exception& ie)
259 ie.set_pos (
len, i+1);
278 ra_idx.xelem (i) = idx_arg(i).index_vector ();
280 catch (octave::index_exception& ie)
283 ie.set_pos (
len, i+1);
308 error (
"Cell::column: requires 2-D cell array");
310 if (i < 0 || i >=
cols ())
311 error (
"invalid column selection");
352 r[i] = ((p++)->*fcn) ();
N Dimensional Array with copy-on-write semantics.
OCTARRAY_API Array< T, Alloc > index(const octave::idx_vector &i) const
Indexing without resizing.
OCTARRAY_OVERRIDABLE_FUNC_API const T * data(void) const
Size of the specified dimension.
OCTARRAY_API void assign(const octave::idx_vector &i, const Array< T, Alloc > &rhs, const T &rfv)
Indexed assignment (always with resize & fill).
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_OVERRIDABLE_FUNC_API const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
OCTARRAY_API void resize(const dim_vector &dv, const octave_value &rfv)
OCTARRAY_API Array< T, Alloc > & insert(const Array< T, Alloc > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type rows(void) const
OCTARRAY_API octave_value * fortran_vec(void)
OCTARRAY_API void delete_elements(const octave::idx_vector &i)
Deleting elements.
OCTARRAY_OVERRIDABLE_FUNC_API int ndims(void) const
OCTARRAY_OVERRIDABLE_FUNC_API octave_value & elem(octave_idx_type n)
OCTARRAY_API Array< T, Alloc > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type cols(void) const
OCTARRAY_OVERRIDABLE_FUNC_API T & xelem(octave_idx_type n)
Size of the specified dimension.
Cell & insert(const Cell &a, octave_idx_type r, octave_idx_type c)
bool iscellstr(void) const
void assign(const octave_value_list &idx, const Cell &rhs, const octave_value &fill_val=Matrix())
Cell column(octave_idx_type i) const
octave_idx_type nnz(void) const
Cell concat(const Cell &rb, const Array< octave_idx_type > &ra_idx)
Array< std::string > cellstr_value(void) const
Cell index(const octave_value_list &idx, bool resize_ok=false) const
Cell diag(octave_idx_type k=0) const
void delete_elements(const octave_value_list &idx)
octave_value resize_fill_value(void) const
Size of the specified dimension.
Cell map(ctype_mapper) const
string_vector string_vector_value(void) const
Vector representing the dimensions (size) of an Array.
octave_idx_type length(void) const
std::string string_value(bool force=false) const
std::string & xelem(octave_idx_type i)
octave_idx_type numel(void) const
void error(const char *fmt,...)
void warn_empty_index(const std::string &type_name)
void err_wrong_type_arg(const char *name, const char *s)
octave::idx_vector idx_vector
const octave_base_value const Array< octave_idx_type > & ra_idx
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.