At 3:10 PM -0400 6/7/00, Bijan Parsia wrote:
>The elegance comes from using the indices as the page index, rather than
>simulating them with assocations of the form 1->aSwikiPage.
>
>I don't recall what access times are for OrderedCollections. Since, an
>OrderCollection is really a wrapper around an array (an not a linked
>list) access times should be constant, though a *little* slower than a
>straight array due to index calcuation.
OrderedCollections are only slightly slower than Arrays in access
because of the bounds checking. Index calculation is not different
between OC and A. Growing the OrderedCollection is where they get
slow. (Remember: If an OrderedCollection has to increase its size at
all, it doubles its existing size.)
For these issues of reverse lookup and the like, it seems to me that
the fastest and most elegant solution may be a set of Dictionaries
that point to the same pages -- each Dictionary offers a different
index (page number, page title, etc.) into the objects. Average
access time will be faster than having to do a search on any index.
Mark
--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
Associate Professor - Learning Sciences & Technologies.
Collaborative Software Lab - http://coweb.cc.gatech.edu/csl/
(404) 894-5618 : Fax (404) 894-0673 : [EMAIL PROTECTED]
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html