[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex()
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex() |
Date: |
Tue, 3 May 2022 07:48:51 -0400 (EDT) |
Follow-up Comment #3, bug #62405 (project octave):
>From the documentation of subsindex:
https://octave.org/doc/v7.1.0/Defining-Indexing-And-Indexed-Assignment.html#index-subsindex
> When obj is a class object defined with a class constructor, then subsindex
is the overloading method that allows the conversion of this class object to a
valid indexing vector.
If I understand that correctly, `subsindex` converts the object to an indexing
vector (to be able to index *into* something else). And that seems to be what
is happening (and working ass expected) in your examples.
>From what you are describing, I guess that you would like to index into the
object with an already existing indexing vector. Is that correct? In that
case, you might want to overload `subsref`:
https://octave.org/doc/v7.1.0/Defining-Indexing-And-Indexed-Assignment.html#index-subsref
And index into your object like, e.g., `input_container(b)` (so, the other way
round).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62405>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Markus Mützel, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(),
Markus Mützel <=
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Markus Mützel, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Glite, 2022/05/03
- [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex(), Markus Mützel, 2022/05/04