swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: !(Collections Documentation)


From: Roger M. Burkhart
Subject: Re: !(Collections Documentation)
Date: Fri, 8 Mar 1996 07:43:03 -0600

>From Doug Donalson's message earlier this week:

> Nelson or Roger or ...,
> 
>    Do you have some piece of code that demonstrates how to use
>    the Map linked list.  I have been slogging around in the code
>    for a while now and I can't seem to get it to work correctly.

I didn't see any other response to your message, and just got back
from travel earlier this week, so I'll try a quick response.

They only examples I have on use of a Map collection are in the simple
grid test programs (grid3.m, grid3b.m) as well as in the scheduling
machinery itself.  These are by no means complete even as test cases;
the real answer to your questions will be in the documentation now in
progress.  Incidentally, a Map is not necessarily a linked list; it is
a mapping from key values to member object values, which will eventually
have multiple implementations including balanced trees.  The current
linked list implementation has been kept so far because it works fine
on small collections and is the most forgiving of random insertions
and deletions.

I don't see anything obviously wrong with your code, but without seeing
more context can't say for sure.  I see you're inserting the Map with a
time as a key value; is this an object that supports the message
"compare:" (usage: [aKey compare: anotherKey]) as required if you don't
specify your own compare function?

The next step if you suspect something wrong would be a stack trace at
the point of trace, coupled with a simple test program that reproduces
the problem, if this is easy to do.

Roger


reply via email to

[Prev in Thread] Current Thread [Next in Thread]