26 #if ! defined (octave_ovl_h)
27 #define octave_ovl_h 1
29 #include "octave-config.h"
33 #include <initializer_list>
50 : m_data (
n), m_names () { }
53 : m_data (
n, val), m_names () { }
56 : m_data (1, tc), m_names () { }
58 template<
template <
typename...>
class OV_Container>
60 : m_data (args.begin (), args.end ()), m_names () { }
63 : m_data (a.
numel ()), m_names ()
70 : m_data (c.
numel ()), m_names ()
94 if (! m_data.empty ())
99 retval.
xelem (i) = m_data[i];
115 bool empty ()
const {
return length () == 0; }
119 m_data.resize (
n, rfv);
137 std::vector<octave_value> slice_data (tlen);
138 auto beg = m_data.begin () + offset;
139 auto end = beg +
len;
140 std::copy (beg, end, slice_data.begin ());
144 if (tags &&
len > 0 && m_names.numel () > 0)
155 bool all_strings_p ()
const;
157 bool all_scalars ()
const;
159 bool any_cell ()
const;
161 bool has_magic_colon ()
const;
169 void make_storable_values ();
178 return m_data.front ();
185 std::vector<octave_value> m_data;
217 template<
typename... OV_Args>
219 ovl (
const OV_Args& ... args)
charNDArray min(char d, const charNDArray &m)
void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
T & xelem(octave_idx_type n)
Size of the specified dimension.
octave_idx_type numel() const
Number of elements in the array.
Vector representing the dimensions (size) of an Array.
octave_value & xelem(octave_idx_type i)
octave_value_list(const OV_Container< octave_value > &args)
octave_value_list(const octave_value_list &obj)=default
void resize(octave_idx_type n, const octave_value &rfv=octave_value())
Array< octave_value > array_value() const
void stash_name_tags(const string_vector &nm)
~octave_value_list()=default
octave_value_list(const Cell &c)
octave_value_list()=default
octave_value_list(octave_idx_type n, const octave_value &val)
octave_value_list(octave_idx_type n)
octave_value_list(octave_value_list &&obj)=default
octave_value_list(const octave_value &tc)
octave_value first_or_nil_ov() const
string_vector name_tags() const
octave_value_list slice(octave_idx_type offset, octave_idx_type len, bool tags=false) const
octave_value_list(const Array< octave_value > &a)
octave_idx_type length() const
string_vector linear_slice(octave_idx_type lo, octave_idx_type up) const
T::size_type numel(const T &str)
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.