51 std::string s = sv[i];
55 size_t pos = s.find_last_not_of (
' ');
57 s = (pos == std::string::npos) ?
"" : s.substr (0, pos+1);
68 size_t n = lst.size ();
76 for (std::list<std::string>::const_iterator it = lst.begin ();
77 it != lst.end (); it++)
90 const std::string *src = sa.
data ();
112 std::string s = sv[i];
116 size_t pos = s.find_last_not_of (
' ');
118 s = (pos == std::string::npos) ?
"" : s.substr (0, pos+1);
135 if (!
elem(i).is_string ())
200 iv(i) = idx_arg(i).index_vector ();
231 ra_idx(i) = idx_arg(i).index_vector ();
245 ra_idx.
xelem (i) = idx_arg(i).index_vector ();
270 if (i < 0 || i >=
cols ())
271 error (
"invalid column selection");
283 error (
"Cell::column: requires 2-d cell array");
291 return insert (rb, ra_idx);
317 r[i] = ((p++)->*fcn) ();
octave_idx_type nnz(void) const
void gripe_wrong_type_arg(const char *name, const char *s, bool is_error)
const octave_base_value const Array< octave_idx_type > & ra_idx
octave_idx_type numel(void) const
Number of elements in the array.
void delete_elements(const idx_vector &i)
Deleting elements.
octave_idx_type length(void) const
void assign(const octave_value_list &idx, const Cell &rhs, const octave_value &fill_val=Matrix())
void error(const char *fmt,...)
Array< T > diag(octave_idx_type k=0) const
Get the kth super or subdiagonal.
octave_value & elem(octave_idx_type n)
Cell map(ctype_mapper) const
octave_idx_type rows(void) const
Array< T > & insert(const Array< T > &a, const Array< octave_idx_type > &idx)
Insert an array into another at a specified position.
const dim_vector & dims(void) const
Return a const-reference so that dims ()(i) works efficiently.
Array< std::string > cellstr_value(void) const
std::string string_value(bool force=false) const
const T * data(void) const
void resize(const dim_vector &dv, const octave_value &rfv)
Cell concat(const Cell &rb, const Array< octave_idx_type > &ra_idx)
bool is_cellstr(void) const
Cell & insert(const Cell &a, octave_idx_type r, octave_idx_type c)
T & xelem(octave_idx_type n)
Handles the reference counting for all the derived classes.
octave_idx_type length(void) const
Number of elements in the array.
octave_value_list ovl(const octave_value &a0)
void delete_elements(const octave_value_list &idx)
Cell column(octave_idx_type i) const
Cell index(const octave_value_list &idx, bool resize_ok=false) const
void assign(const idx_vector &i, const Array< T > &rhs, const T &rfv)
Indexed assignment (always with resize & fill).
const octave_value * fortran_vec(void) const
octave_idx_type cols(void) const
Cell diag(octave_idx_type k=0) const
Array< T > index(const idx_vector &i) const
Indexing without resizing.