23 #if ! defined (octave_pt_tm_const_h) 24 #define octave_pt_tm_const_h 1 26 #include "octave-config.h" 63 : m_count (1), m_dv (0, 0), m_all_str (
false),
66 m_all_mt (true), m_any_cell (
false), m_any_sparse (
false),
68 m_first_elem_is_struct (
false), m_class_nm (), m_ok (
false)
72 : m_count (1), m_dv (0, 0), m_all_str (
false), m_all_sq_str (
false),
74 m_all_mt (true), m_any_cell (
false), m_any_sparse (
false),
76 m_first_elem_is_struct (
false), m_class_nm (), m_ok (
false)
122 : m_rep (nullptr) { }
136 if (
this != &
x && m_rep !=
x.m_rep)
138 if (m_rep && --m_rep->m_count == 0)
152 if (m_rep && --m_rep->m_count == 0)
159 bool empty (
void)
const {
return m_rep->empty (); }
161 size_t length (
void)
const {
return m_rep->length (); }
175 bool all_1x1_p (
void)
const {
return m_rep->m_all_1x1; }
182 operator bool ()
const {
return (m_rep && m_rep->m_ok); }
201 : m_dv (0, 0), m_all_str (
false), m_all_sq_str (
false),
202 m_all_dq_str (
false),
204 m_all_mt (true), m_any_cell (
false), m_any_sparse (
false),
205 m_any_class (
false), m_class_nm (), m_ok (
false)
229 operator bool ()
const {
return m_ok; }
260 template <
typename TYPE,
typename T>
270 if (
row.dims ().any_zero ())
273 for (
auto& elt :
row)
277 TYPE ra = octave_value_extract<TYPE> (elt);
294 template <
typename TYPE,
typename T>
305 if (
tmp.length () == 1)
315 assert (static_cast<size_t> (
result.numel ()) ==
row.length ());
317 for (
const auto& elt :
row)
318 result(
i++) = octave_value_extract<T> (elt);
327 for (
const auto& elt :
row)
331 array_list[
i++] = octave_value_extract<TYPE> (elt);
343 template <
typename TYPE,
typename T>
366 for (
auto& elt :
row)
370 sparse_list[
i] = octave_value_extract<TYPE> (elt);
375 sparse_row_list[j] = stmp;
382 template <
typename MAP>
402 for (
auto& elt :
row)
406 map_list[
i] = octave_value_extract<MAP> (elt);
411 map_row_list[j] = mtmp;
418 template <
typename TYPE>
octave_idx_type rows(void)
static octave_map cat(int dim, octave_idx_type n, const octave_scalar_map *map_list)
size_t length(void) const
bool all_strings_p(void) const
bool any_sparse_p(void) const
bool all_sq_strings_p(void) const
bool some_strings_p(void) const
std::list< octave_value >::iterator iterator
bool any_sparse_p(void) const
octave_idx_type cols(void) const
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
bool all_empty_p(void) const
tm_row_const_rep::iterator iterator
octave_idx_type cols(void)
octave_value do_single_type_concat(const dim_vector &dv, tm_const &tmp)
bool any_zero(void) const
bool any_class_p(void) const
tm_const(const tree_matrix &tm, tree_evaluator *tw=nullptr)
bool all_real_p(void) const
bool all_strings_p(void) const
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are empty
bool all_dq_strings_p(void) const
bool all_complex_p(void) const
bool some_strings_p(void) const
static Array< T > cat(int dim, octave_idx_type n, const Array< T > *array_list)
Concatenation along a specified (0-based) dimension, equivalent to cat().
octave_value do_single_type_concat< octave_map >(const dim_vector &dv, tm_const &tmp)
bool all_dq_strings_p(void) const
std::string class_name(void) const
bool first_elem_struct_p(void) const
With real return the complex result
const_iterator end(void) const
bool all_1x1_p(void) const
N Dimensional Array with copy-on-write semantics.
bool any_class_p(void) const
std::list< octave_value >::const_iterator const_iterator
tm_row_const_rep(const tree_argument_list &row, tree_evaluator *tw)
bool any_cell_p(void) const
tm_row_const(const tree_argument_list &row, tree_evaluator *tw)
octave_value do_class_concat(tm_const &tmc)
bool all_real_p(void) const
tm_row_const(const tm_row_const &x)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
bool all_complex_p(void) const
bool all_1x1_p(void) const
tm_row_const_rep::const_iterator const_iterator
octave_idx_type rows(void) const
bool m_first_elem_is_struct
Vector representing the dimensions (size) of an Array.
bool any_cell_p(void) const
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
void single_type_concat(Array< T > &result, tm_const &tmp)
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
static Sparse< T > cat(int dim, octave_idx_type n, const Sparse< T > *sparse_list)
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
bool all_empty_p(void) const
bool all_sq_strings_p(void) const
const_iterator begin(void) const
dim_vector dims(void) const