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-Thread: 103376,154942e4f1d1b8e9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!texta.sil.at!newsfeed.inode.at!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Dynamically tagged expression required Date: Sun, 11 Dec 2005 16:18:29 +0100 Organization: Cablecom Newsserver Message-ID: <2298388.iX7fXsMMLb@linux1.krischik.com> References: <2852224.m2vuDFxfOX@linux1.krischik.com> <3818406.kEZhMvudHC@linux1.krischik.com> <3610380.mzgl1UEuzs@linux1.krischik.com> NNTP-Posting-Host: 84-73-0-2.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1134315033 11965 84.73.0.2 (11 Dec 2005 15:30:33 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Sun, 11 Dec 2005 15:30:33 +0000 (UTC) User-Agent: KNode/0.9.2 Xref: g2news1.google.com comp.lang.ada:6830 Date: 2005-12-11T16:18:29+01:00 List-Id: 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