From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e33eec6b5394f9ec X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-27 18:31:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread1.news.atl.earthlink.net.POSTED!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: Multiple linked data structure References: <404ee0af.0308270752.90ac2b6@posting.google.com> From: Matthew Heaney Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 Date: Thu, 28 Aug 2003 01:31:11 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.atl.earthlink.net 1062034271 65.110.133.134 (Wed, 27 Aug 2003 18:31:11 PDT) NNTP-Posting-Date: Wed, 27 Aug 2003 18:31:11 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:41909 Date: 2003-08-28T01:31:11+00:00 List-Id: fjloma@andaluciajunta.es (Francisco Javier Loma Daza) writes: > Have you faced a similar question? are there a design pattern that > encapsulates and solves efficiently this kind of problems? It sounds like most of your problems can be solved with lists. The Charles library has both single and double-linked lists. When you insert an item in the list, an iterator is returned that designates the new list item. You can then put the list iterator into any other kind of container, such as a queue or even another list. If you need to perform lookups that have better then O(n) time complexity you can use the sets or maps. Charles is available at my home page. http://home.earthlink.net/~matthewjheaney/charles/