comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Dynamically tagged expression required
Date: Sun, 11 Dec 2005 16:18:29 +0100
Date: 2005-12-11T16:18:29+01:00	[thread overview]
Message-ID: <2298388.iX7fXsMMLb@linux1.krischik.com> (raw)
In-Reply-To: uzmn7emoy.fsf@earthlink.net

Matthew Heaney wrote:

>> Just to clarify: There is also a default IKeySortedSet - for those who
>> don't want to make too much thinking when choosing a container.
 
> I wonder how this works?  Does it assume something about the key type
> (maybe all types have a hash function a la Java, or have a relationship
> operator), or
> does it just use a list underneath? 

You had to define an key-access-class or (implicitly) use one predefined
key-access-classes for common cases.



> What is the time complexity? 

Choosing the right container variant has a great impact on time complexity.
That is why casual users of the OCL often said that to OCL is slow. But in
truth they have just chosen the wrong container for the task.

The OCL containers where build like LEGO blocks - there where fundamental
building block which where recombined to give quite large set of container:

IKeySet         
IKeyBag         
IMap 
IRelation 
ISet    
IBag 
IKeySortedSet
IKeySortedBag           
IPriorityQueue  
ISortedMap      
ISortedRelation         
ISortedSet      
ISortedBag      
IEqualitySequence       
ISequence       
IStack 
IDeque  
IQueue 
IHeap

Bur the real interesting part where the variants. For each of the base type
there where variants. i.E. IBag has the following variants:

IBagAsAvlTree 
IBagAsBstTree
IBagAsDilTable
IBagAsHshTable
IBagAsList 
IBagAsTable 
IBagOnBSTKeySortedSet 
IBagOnHashKeySet 
IBagOnSortedDilutedSequence
IBagOnSortedLinkedSequence 
IBagOnSortedTabularSequence

If you want and complete overview read:

http://www.mainserver.state.mn.us/bookmgr-cgi/bookmgr.exe/handheld/Connected/BOOKS/IBMBK.Z6CCO.CBCIT100.BOOK/2.6.1?SHELF=IBMBK.Z6CCO.CBCBS150.BKSHELF&DT=20030509155052
http://hikwww2.fzk.de/hik/orga/verdi/rs/Dokumentation/Cpp/Cpp/classref/ref/IBag.htm

IBM really put some effort in here and it is all going to the scrap heap.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



  reply	other threads:[~2005-12-11 15:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 13:50 Dynamically tagged expression required Maciej Sobczak
2005-12-08 14:46 ` Georg Bauhaus
2005-12-08 14:52 ` Dmitry A. Kazakov
2005-12-08 19:17 ` Martin Krischik
2005-12-09  9:09   ` Maciej Sobczak
2005-12-09 12:05     ` Jean-Pierre Rosen
2005-12-09 16:41     ` Robert A Duff
2005-12-09 20:18       ` Martin Krischik
2005-12-11  0:43         ` Matthew Heaney
2005-12-11 11:45           ` Martin Krischik
2005-12-11 14:24             ` Matthew Heaney
2005-12-11 15:18               ` Martin Krischik [this message]
2005-12-11 18:07             ` Matthew Heaney
2005-12-12 19:16               ` Martin Krischik
2005-12-13 20:43                 ` Georg Bauhaus
2005-12-13 21:00                   ` Georg Bauhaus
2005-12-09 20:41       ` Randy Brukardt
2005-12-09 20:16     ` Martin Krischik
2005-12-11  0:46       ` Matthew Heaney
2005-12-12  9:44       ` Maciej Sobczak
2005-12-12 19:13         ` Martin Krischik
2005-12-14 10:22           ` Maciej Sobczak
2005-12-15 20:10             ` Martin Krischik
replies disabled

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