23 #if defined (HAVE_CONFIG_H) 53 OCTAVE_NORETURN
static 57 error (
"%s (%s vs %s)", msg,
x.str ().c_str (),
y.str ().c_str ());
85 else if (
val.iscell ())
131 m_any_sparse =
false;
134 bool first_elem =
true;
142 if (
tmp.is_undefined ())
149 if (
tmp.is_cs_list ())
157 do_init_element (tlst(
i), first_elem);
161 do_init_element (
tmp, first_elem);
165 if (m_any_cell && ! m_any_class && ! m_first_elem_is_struct)
185 else if ((! m_any_class) && (! m_dv.hvcat (this_elt_dv, 1)))
186 eval_error (
"horizontal dimensions mismatch", m_dv, this_elt_dv);
196 bool elt_changed =
false;
198 for (
auto& elt : *
this)
215 bool first_elem =
true;
230 else if (! m_dv.hvcat (this_elt_dv, 1))
231 eval_error (
"horizontal dimensions mismatch", m_dv, this_elt_dv);
246 m_any_sparse =
false;
248 m_all_1x1 = ! tm.
empty ();
250 bool first_elem =
true;
251 bool first_elem_is_struct =
false;
264 first_elem_is_struct =
tmp.first_elem_struct_p ();
269 if (
tmp && !
tmp.empty ())
271 if (m_all_str && !
tmp.all_strings_p ())
274 if (m_all_sq_str && !
tmp.all_sq_strings_p ())
275 m_all_sq_str =
false;
277 if (m_all_dq_str && !
tmp.all_dq_strings_p ())
278 m_all_dq_str =
false;
280 if (! m_some_str &&
tmp.some_strings_p ())
283 if (m_all_real && !
tmp.all_real_p ())
286 if (m_all_cmplx && !
tmp.all_complex_p ())
289 if (m_all_mt && !
tmp.all_empty_p ())
292 if (! m_any_cell &&
tmp.any_cell_p ())
295 if (! m_any_sparse &&
tmp.any_sparse_p ())
298 if (! m_any_class &&
tmp.any_class_p ())
301 m_all_1x1 = m_all_1x1 &&
tmp.all_1x1_p ();
309 if (m_any_cell && ! m_any_class && ! first_elem_is_struct)
311 for (
auto& elt : *
this)
341 else if (m_all_str && m_dv.ndims () == 2
342 && this_elt_dv.
ndims () == 2)
346 if (m_dv.any_zero ())
354 if (this_elt_nc >
cols ())
355 m_dv(1) = this_elt_nc;
356 m_dv(0) += this_elt_nr;
359 else if ((! m_any_class) && (! m_dv.hvcat (this_elt_dv, 0)))
360 eval_error (
"vertical dimensions mismatch", m_dv, this_elt_dv);
373 if (
tmp.all_1x1_p ())
374 single_type_concat<octave_scalar_map> (
result,
dv,
tmp);
392 if (tmrc.length () == 1)
393 rows(j++) = *(tmrc.begin ());
399 for (
auto& elt : tmrc)
406 if (
rows.length () == 1)
octave_idx_type rows(void)
static OCTAVE_NORETURN void eval_error(const char *msg, const dim_vector &x, const dim_vector &y)
identity matrix If supplied two scalar respectively For allows like xample val
bool zero_by_zero(void) const
void init(const tree_matrix &tm, tree_evaluator *tw)
size_t length(void) const
void error(const char *fmt,...)
octave_idx_type cols(void)
octave_value do_single_type_concat< octave_map >(const dim_vector &dv, tm_const &tmp)
With real return the complex result
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value do_class_concat(tm_const &tmc)
void do_init_element(const octave_value &, bool &)
void init(const tree_argument_list &, tree_evaluator *tw)
octave_idx_type length(void) const
the element is set to zero In other the statement xample y
octave_value evaluate(tree_expression *expr, int nargout=1)
octave_idx_type ndims(void) const
Number of dimensions.
void append(const octave_value &s)
std::string get_concat_class(const std::string &c1, const std::string &c2)
bool m_first_elem_is_struct
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
std::string class_name(void) const
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x