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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: dirk@feles.cs.kuleuven.be. (Dirk Craeynest) Newsgroups: comp.lang.ada Subject: Re: Permutation generator in ada library Date: Sat, 4 Oct 2014 18:06:58 +0000 (UTC) Organization: Ada-Belgium, c/o Dept. of Computer Science, K.U.Leuven Message-ID: References: <5b7788b4-323f-42db-99e9-66c989992abb@googlegroups.com> <65470b5b-36f7-4289-acd8-114b2590b5da@googlegroups.com> Injection-Date: Sat, 4 Oct 2014 18:06:58 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="2dacc763d5aee253ed9b901ccded1054"; logging-data="18009"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+eU+XCPBtCT8+D3m/YOZfqzJWrfMZ5I3k=" Summary: Permutations_Class available in ASE2 mirror at Ada-Belgium site Originator: dirk@feles.cs.kuleuven.be. (Dirk Craeynest) X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Cancel-Lock: sha1:UREuRLfJ9JpFM9zRPIE8pUfSZTk= Xref: news.eternal-september.org comp.lang.ada:22085 Date: 2014-10-04T18:06:58+00:00 List-Id: The code by Doug Bryan, that John mentions at the end of his posting, was included in the "Ada and Software Engineering Library Version 2 (ASE2)". Numerous versions of the ASE library were put together by Richard Conn, the last one in October 2000. They were typically distributed on CDROM at the time, among others at various Ada events such as ACM SIGAda and Ada-Belgium conferences. The last ASE2 version is still available on the Ada-Belgium site: ftp://ftp.cs.kuleuven.be/pub/Ada-Belgium/ase/index.htm The s.c. "asset" that includes the Permutations_Class package is at: ftp://ftp.cs.kuleuven.be/pub/Ada-Belgium/ase/support/cardcatx/csparts.htm The relevant source code is included in the files CSPARTS.SRC and CSPARTB2.SRC in the csparts.zip archive, retrievable via the above URL. Enjoy... ;-) Dirk Dirk.Craeynest@cs.kuleuven.be (for Ada-Belgium/Ada-Europe/SIGAda/WG9) *** 20th Intl.Conf.on Reliable Software Technologies - Ada-Europe'2015 *** June 22-26, 2015 **** Madrid, Spain **** http://www.ada-europe.org = Newsgroups: comp.lang.ada = Date: Fri, 3 Oct 2014 11:50:30 -0700 (PDT) = Subject: Re: Permutation generator in ada library = From: jpwoodruff@gmail.com = [...] = = I can address the original issue about permutation-generating Ada. = >From my pack-rat days, I'm aware of three implementations that might = serve. = [...] = = My oldest holding is an archeological remnant from Simtel 20, built by = Doug Bryan. = = "This software is released to the Public Domain" but I don't know = where there is a public copy. I'd be happy to share with anyone = interested. jpwoodruff@gmail.com = = = -- Unit name : Permutations_Class = -- Version : 1.0 = -- Author : Doug Bryan = -- : Computer Systems Lab = -- : Stanford University = -- : Stanford CA, 94305 = -- DDN Address : bryan@su-sierra = -- Copyright : (c) -none- = -- Date created : 15 April 1985 = -- Release date : 15 April 1985 = -- Last update : 15 April 1985 = -- Machine/System Compiled/Run on : DG MV/10000 ADE 2.2 = = generic = type Item_Type is private; = type Index_Type is (<>); = type List_Type is array (Index_Type range <>) of Item_Type; = package Permutations_Class is = = generic = with procedure Process (A_Permutation : List_Type); = procedure Iterate_Through_Length_Factorial_Permutations = (Of_Items : List_Type); = = -- For an actual parameter for Of_Items of length n, n! (n factorial) = -- permutations will be produced. = = -- The procedure permutes the elements in the array ITEMS. = -- actually it permutes their indicies and re-arranges the items = -- within the list. The procedure does not care of any or all = -- of the items in the list are equal (the same). = = end Permutations_Class; = = John