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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ecfc0548c2df0d76 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-11 08:09:58 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 11 Nov 2003 10:09:55 -0600 Date: Tue, 11 Nov 2003 11:09:54 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: MI ammunition : linked lists References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-hTcm7BYn+IegwaxbIae/HvZxY8lTv4Pht+9zxybhcnXzjdmrUGfp4mKblU79Lh0KzvuvH/4puzA1spL!mbFfycLLyr+1WyQ9ZJaR4CnaXUFDwMS3k1Pt4vw86TWxY8862UTNSOre/5aUvA== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:2356 Date: 2003-11-11T11:09:54-05:00 List-Id: Lutz Donnerhacke wrote: > * Marius Amado Alves wrote: > My fault. > package Base_List2 is new Double_Linked_List (List1.Object); use Base_List2; Should be Base_List1.Object, right? >>But anyway this does not look like data being shared between lists. It is. What is going on is that you have two doubly linked lists and Objects can be on one or the other list, or both, and in different orders in the two lists. Using mix-ins this way is very powerful. I have used a slightly more complex version of this to create a sparse matrix type. Since the elements are kept in sorted order by each index, most matrix operations can be completed in times proportional to the number of non-zero entries. (Oh, and the matrix and vector objects are controlled, but the package maintains a collection of free nodes, which are not controlled, and allocates more as needed 1000 at a time.) -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.