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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cda33fc7f63c2885 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-13 15:54:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!elk.ncren.net!nntp.upenn.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: list strawman Date: Sun, 13 Jan 2002 18:47:50 -0500 Organization: Michigan State University Message-ID: References: <6i%_7.8890$fG.50588@rwcrnsc51.ops.asp.att.net> <3C3CAFEC.D24955EC@acm.org> <3C3F2323.F5D52DBF@boeing.com> <3C3FCD5C.25841A6C@acm.org> <3C41BDF6.6E797663@acm.org> Reply-To: "Chad R. Meiners" NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:18878 Date: 2002-01-13T18:47:50-05:00 List-Id: "Jeffrey Carter" wrote in message news:3C41BDF6.6E797663@acm.org... > > Perhaps I'm missing something, but how can you radix sort > > type Element is range System.Min_Int .. System.Max_Int; > > into ascending order? I guess I would need to see an actual > implementation of a generic radix sort and how a client would invoke it > for my limited brain to understand what you're getting at. Well I don't currently have time to whip up an implementation right now, but the general method would be to choose the base that you want to sort by (like base 2 , base 256 or base 2**10 and so on) then you map the type to an unsigned integer and take ceiling(log_base (Element'Lenght)) passes to sort the list. For the buckets you simply create an array of lists and when we finish each pass you simply append the array of lists together to prepare for the next pass. When I have time, I'll look into implementing the sort if you would like to see it. -CRM