26 #if defined (HAVE_CONFIG_H)
58 switch (m_index.length (0))
61 retval =
new octave_scalar (
static_cast<double> (m_index(0) + 1));
78 return double (m_index.checkelem (
n) + 1);
93 return m_value.
permute (vec, inv);
109 const dim_vector odims = m_index.orig_dimensions ();
112 && (dim >= 0 && dim <= 1) && odims(1-dim) == 1)
123 const dim_vector odims = m_index.orig_dimensions ();
126 && (dim >= 0 && dim <= 1) && odims(1-dim) == 1)
136 if (m_index.is_range ())
148 return m_index.as_array ().issorted (mode);
154 return m_index.as_array ().sort_rows_idx (mode);
160 return m_index.as_array ().is_sorted_rows (mode);
223 static const std::string value_save_tag (
"index_value");
228 return save_text_data (os, make_value (), value_save_tag,
false, 0);
237 if (nm != value_save_tag)
238 error (
"lazy_index: corrupted data on load");
249 "",
false, save_as_floats);
260 if (nm != value_save_tag)
261 error (
"lazy_index: corrupted data on load");
Vector representing the dimensions (size) of an Array.
octave_idx_type ndims() const
Number of dimensions.
octave_value as_int64() const
sortmode issorted(sortmode mode=UNSORTED) const
bool save_ascii(std::ostream &os)
octave_value reshape(const dim_vector &new_dims) const
octave_value as_int32() const
octave_value as_int16() const
octave_value as_uint64() const
uint8NDArray uint8_array_value() const
int8NDArray int8_array_value() const
uint32NDArray uint32_array_value() const
bool load_binary(std::istream &is, bool swap, octave::mach_info::float_format fmt)
int16NDArray int16_array_value() const
int32NDArray int32_array_value() const
octave_value fast_elem_extract(octave_idx_type n) const
bool load_ascii(std::istream &is)
uint64NDArray uint64_array_value() const
octave_base_value * try_narrowing_conversion()
uint16NDArray uint16_array_value() const
FloatNDArray float_array_value(bool flag=false) const
octave_value as_uint32() const
octave_value as_double() const
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
bool save_binary(std::ostream &os, bool save_as_floats)
octave_value squeeze() const
NDArray array_value(bool flag=false) const
type_conv_info numeric_conversion_function() const
octave_value permute(const Array< int > &vec, bool inv=false) const
int64NDArray int64_array_value() const
octave_value as_uint16() const
octave_value as_single() const
octave_value as_uint8() const
octave_value as_int8() const
octave_value full_value() const
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
octave::idx_vector index_vector(bool=false) const
static int static_type_id()
octave_base_value * clone() const
octave::idx_vector index_vector(bool require_integers=false) const
octave_value permute(const Array< int > &vec, bool inv=false) const
void() error(const char *fmt,...)
octave::idx_vector idx_vector
std::string read_binary_data(std::istream &is, bool swap, octave::mach_info::float_format fmt, const std::string &filename, bool &global, octave_value &tc, std::string &doc)
bool save_binary_data(std::ostream &os, const octave_value &tc, const std::string &name, const std::string &doc, bool mark_global, bool save_as_floats)
std::string read_text_data(std::istream &is, const std::string &filename, bool &global, octave_value &tc, octave_idx_type count, const bool do_name_validation)
bool save_text_data(std::ostream &os, const octave_value &val_arg, const std::string &name, bool mark_global, int precision)
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)