Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
which datastructures to use ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

which datastructures to use ?



hi all! I am wondering how to implement something.. ->

a nested namespace (hashtable) where each space is
associated (by internal variable) with another
namespace, being its parameter space.

so each node is an object-space (a namespace
describing the objects it contains), and a
parameter-space (a namespace describing the parameters
of that node).

the parameter space is transparent, so the parameter
'yeah' in /some/address will be visible to all
parameter-spaces contained (unless redefined).

I hope it's clear what I am trying to do..
it just all needs to happen as fast as possible. the
size of each individual object-space and
parameter-space will be 256 entries max.

so do I implement as above? or is there a faster way?

I was thinking, hashing the whole address string to
find the parameter-space in a single array is probably
going to be faster than resolving the address a
component-at-a-time.

but it would possibly make it harder to find the
children and the parent of that node.

so i was wondering if doing it this way, there would
be a simple way of going:

new: create "thing" at "/some/address", setting the
"parent" variable to the object at "/some/address"

at: return the object at /some/address or all objects
beginning with /some/address

delete: delete all nodes beginning with /some/address
(and deallocate them)


really appreciate any comments as I don't know much
about hash or search structures.

cheers! - alex









____________________________________________________
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search
http://au.local.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.