comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: MI ammunition : linked lists
Date: Tue, 11 Nov 2003 11:09:54 -0500
Date: 2003-11-11T11:09:54-05:00	[thread overview]
Message-ID: <pJadndITnrtJlCyiRVn-sQ@comcast.com> (raw)
In-Reply-To: <slrnbr1n8f.ru.lutz@taranis.iks-jena.de>

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.




  reply	other threads:[~2003-11-11 16:09 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-06 16:32 MI ammunition : linked lists amado.alves
2003-11-06 16:46 ` Stephen Leake
2003-11-06 17:15 ` Frank J. Lhota
2003-11-08 10:27   ` Dmitry A. Kazakov
2003-11-06 17:16 ` Jean-Pierre Rosen
2003-11-06 18:15   ` Wes Groleau
2003-11-06 21:03   ` Simon Wright
2003-11-07 10:39     ` Dmitry A. Kazakov
2003-11-07 10:29 ` Dmitry A. Kazakov
2003-11-10 14:51 ` Lutz Donnerhacke
2003-11-10 17:52   ` Marius Amado Alves
2003-11-11  9:32     ` Lutz Donnerhacke
2003-11-11 12:24       ` Marius Amado Alves
2003-11-11 12:58         ` Lutz Donnerhacke
2003-11-11 16:09           ` Robert I. Eachus [this message]
2003-11-11 17:11             ` Marius Amado Alves
2003-11-12  9:21               ` Lutz Donnerhacke
  -- strict thread matches above, loose matches on Subject: below --
2003-11-06 17:26 amado.alves
2003-11-06 17:33 amado.alves
2003-11-06 19:01 amado.alves
2003-11-11 18:38 ` Georg Bauhaus
2003-11-11 21:27   ` Marius Amado Alves
2003-11-12  0:23     ` Georg Bauhaus
2003-11-12 11:29 amado.alves
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox