diff --git a/libinterp/octave-value/ov-lazy-idx.cc b/libinterp/octave-value/ov-lazy-idx.cc --- a/libinterp/octave-value/ov-lazy-idx.cc +++ b/libinterp/octave-value/ov-lazy-idx.cc @@ -70,6 +70,12 @@ octave_lazy_index::try_narrowing_convers } octave_value +octave_lazy_index::fast_elem_extract (octave_idx_type n) const +{ + return double (index.checkelem (n)); +} + +octave_value octave_lazy_index::reshape (const dim_vector& new_dims) const { return idx_vector (index.as_array ().reshape (new_dims), diff --git a/libinterp/octave-value/ov-lazy-idx.h b/libinterp/octave-value/ov-lazy-idx.h --- a/libinterp/octave-value/ov-lazy-idx.h +++ b/libinterp/octave-value/ov-lazy-idx.h @@ -53,6 +53,8 @@ public: octave_base_value *try_narrowing_conversion (void); + octave_value fast_elem_extract (octave_idx_type n) const; + size_t byte_size (void) const { return numel () * sizeof (octave_idx_type); } octave_value squeeze (void) const;