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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a3736685ef876ab2 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!n20g2000hsh.googlegroups.com!not-for-mail From: braver Newsgroups: comp.lang.ada Subject: Re: OO Style with Ada Containers Date: Thu, 15 Nov 2007 05:50:33 -0800 (PST) Organization: http://groups.google.com Message-ID: <70b056fe-d5f9-4c66-8582-03c3fd1fc63a@n20g2000hsh.googlegroups.com> References: <1195082906.420079.195000@d55g2000hsg.googlegroups.com> <1195084214.480299.13970@t8g2000prg.googlegroups.com> <1195084752.840598.174460@v65g2000hsc.googlegroups.com> <1195086265.070953.93180@d55g2000hsg.googlegroups.com> <87oddv3l55.fsf@ludovic-brenta.org> <4e65cf83-b296-497f-848e-59d543c19a46@v4g2000hsf.googlegroups.com> <87abpf3fno.fsf@ludovic-brenta.org> NNTP-Posting-Host: 213.145.35.170 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1195134634 20042 127.0.0.1 (15 Nov 2007 13:50:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 15 Nov 2007 13:50:34 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n20g2000hsh.googlegroups.com; posting-host=213.145.35.170; posting-account=V2cESwoAAACnN32CFvmyu4DCs-heiisG User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.24 (Macintosh; Intel Mac OS X; U; en),gzip(gfe),gzip(gfe) Content-Disposition: inline Xref: g2news1.google.com comp.lang.ada:18423 Date: 2007-11-15T05:50:33-08:00 List-Id: On Nov 15, 2:35 pm, Ludovic Brenta wrote: > However in the present case, I advise against iterating over any > container. My small example uses only Find, Insert, and > Replace_Element for each word in the input file; there is no iteration > over a container. True -- iteration is needed when we print out the counts. Back to your original example, why are Ordered_Maps less preferable than Hashed_Sets? My code maintains for each distinct word its overall count, and uses Replace_Element for updating the count -- my impression is each word is stored just once with that use of Ordered_Maps, no? Also, I don't need to give it a hash function. What are the advantages of Hashed_Sets? Cheers, Alexy