swarm-support
[Top][All Lists]
Advanced

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

Ordered Lists


From: Doug Donalson
Subject: Ordered Lists
Date: Wed, 7 Jun 2000 12:58:01 -0700

Assume that I have a set of agents that each have 3 atributes.  Assume now
that, for whatever reason, I want to easily be able to find groups of these
individuals delineated by some range of one of these atributes.  It seems
like an easy way to do this would be to put them into three lists, with each
list ordered on one of the three atributes.

Here's how I think this ordered list would work.

1.)  Create a list using member_t and "getOffset".

2.)  To insert in an ordered list I would first:

       Use index: getKey to find the key of the present member.
       If key was less than or equal to the new insert, then use
insertBefore or insertAfter?
       Is there an addBefore or addAfter?  I thought I have seen them
somewhere in the documentation
       but I can't find them now.

Am I on the right track?

BTW:  OrderedSet looked quite useful but when I looked at the documentation
here is what I found,

(.. This type is currently implemented only using the low-level option of an
internal member slot, and the messages
for that option do not match the documentation in KeyedCollection. If you
need one of these objects, then either use a List or wait for some other
implementation.)

Maybe it's time to remove this from the documentation?  Just a thought...


Cheers,

   D3



*********************************************************************
* Doug Donalson                 Office: (805) 893-2962
* Ecology, Evolution,           Home:   (805) 961-4447
* and Marine Biology            email address@hidden
* UC Santa Barbara
* Santa Barbara Ca. 93106
*********************************************************************
*
*   The most exciting phrase to hear in science, the one that
*   heralds new discoveries, is not "EUREKA" (I have found it) but
*   "That's funny ...?"
*
*       Isaac Asimov
*
*********************************************************************




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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