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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable 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 09:13:02 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!skynet.be!skynet.be!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: MI ammunition : linked lists Date: Tue, 11 Nov 2003 17:11:25 +0000 Organization: Cuivre, Argent, Or Message-ID: References: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1068570707 36203 80.67.180.195 (11 Nov 2003 17:11:47 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Tue, 11 Nov 2003 17:11:47 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: X-Mailer: Ximian Evolution 1.4.5 X-OriginalArrivalTime: 11 Nov 2003 17:11:05.0678 (UTC) FILETIME=[CAB20EE0:01C3A876] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:2362 Date: 2003-11-11T17:11:25+00:00 On Tue, 2003-11-11 at 16:09, Robert I. Eachus wrote: > > * Marius Amado Alves wrote: > >>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. You're right. I misunderstood slightly. Sorry. > 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... Sounds great. I'd love to see a complete example. Don't you have the "type change problem" when you deleted an object from one list but not the other?