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 (
void)
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 (
void)
const;
157 bool all_scalars (
void)
const;
159 bool any_cell (
void)
const;
161 bool has_magic_colon (
void)
const;
169 void make_storable_values (
void);
173 void clear (
void) { m_data.clear (); }
209 template<
typename... OV_Args>
211 ovl (
const OV_Args& ... args)
charNDArray min(char d, const charNDArray &m)
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_API void resize(const dim_vector &dv, const T &rfv)
Size of the specified dimension.
OCTARRAY_OVERRIDABLE_FUNC_API T & xelem(octave_idx_type n)
Size of the specified dimension.
Vector representing the dimensions (size) of an Array.
~octave_value_list(void)=default
Cell cell_value(void) const
octave_value & elem(octave_idx_type n)
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())
void stash_name_tags(const string_vector &nm)
octave_idx_type length(void) const
Array< octave_value > array_value(void) const
octave_value_list(const Cell &c)
octave_value_list(octave_idx_type n, const octave_value &val)
const octave_value & elem(octave_idx_type n) const
octave_value_list(octave_idx_type n)
octave_value_list(octave_value_list &&obj)=default
octave_value_list(const octave_value &tc)
string_vector name_tags(void) 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_value_list(void)=default
std::vector< octave_value > m_data
string_vector linear_slice(octave_idx_type lo, octave_idx_type up) const
T::size_type numel(const T &str)
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.