[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: get(gca) ordered alphabetically?
From: |
Michael Goffioul |
Subject: |
Re: get(gca) ordered alphabetically? |
Date: |
Fri, 10 Feb 2012 23:44:37 +0000 |
On Fri, Feb 10, 2012 at 11:33 PM, Ben Abbott <address@hidden> wrote:
> On Feb 10, 2012, at 6:06 PM, Judd Storrs wrote:
>
>> On Fri, Feb 10, 2012 at 4:29 PM, Ben Abbott <address@hidden> wrote:
>>
>>> I like idea of ordering the properties by when they were created. Even so,
>>> the current situation could be improved. If you're interested in providing
>>> a patch, take a look at graphics.h.in.
>>
>> Wouldn't a hash table be more efficient? Is there any reason to order
>> them at all?
>>
>> --judd
>
> I'm don't know enough about c++ and the graphics code to know, but I'd
> assumed the properties were implemented using a hash table.
>
> The order displayed is identical to the order in which the keys (field names)
> were created.
In such case (get(gca)), the properties are returned in a struct
object (octave_map), which internally uses std::map from the C++
library. So the ordering is "whatever-is-implemented-in-your-STL".
Michael.