[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49559] Implementation of containers.Map
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #49559] Implementation of containers.Map |
Date: |
Fri, 2 Dec 2016 11:25:55 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
Follow-up Comment #3, bug #49559 (project octave):
Thanks for looking into this. I started the implementation using cell arrays
to store keys with the thought that the keys could be anything, or at least a
mix between char and numeric. But given that they can only be either char
vectors or scalars, it makes sense to use structs for char vector keys (esp.
as Octave allows any string as fieldname) and a numeric array for scalar
keys.
So the change is going from
++
keySet = {...}
valueSet = {...}
--
to
++
map = struct(keys, vals)
--
for KeyType "char" or the following for other KeyTypes:
++
keySet = [...]
valueSet = {...}
--
Rik, if you have the time to go into this, please do so. This will be quite a
bit of change to what I wrote but a significant part of the code is also to
deal with the various inputs and methods.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49559>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/