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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.176.69.148 with SMTP id u20mr1519719uau.32.1474643272637; Fri, 23 Sep 2016 08:07:52 -0700 (PDT) X-Received: by 10.157.6.136 with SMTP id 8mr665015otx.9.1474643272581; Fri, 23 Sep 2016 08:07:52 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!m9no2143707qte.0!news-out.google.com!b4ni9953iti.0!nntp.google.com!u18no3552383ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 23 Sep 2016 08:07:52 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:2c4:103:6d70:850e:1fe2:78be:4321; posting-account=bfqYCQoAAADhOBV9jx08D2gm5EA72sgj NNTP-Posting-Host: 2601:2c4:103:6d70:850e:1fe2:78be:4321 References: <955937c4-b9f9-4e21-9d22-98382df2f45f@googlegroups.com> <0e690fe0-7ac8-4843-8792-50ae14729bcc@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: New to Ada need help implementing Warshall's algorithm From: James Brewer Injection-Date: Fri, 23 Sep 2016 15:07:52 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31863 Date: 2016-09-23T08:07:52-07:00 List-Id: On Friday, September 23, 2016 at 1:26:22 AM UTC-5, Simon Wright wrote: > Shark8 <> writes: > > > On Wednesday, September 21, 2016 at 4:05:12 PM UTC-6, James Brewer wrote: > >> Hello I hope this is right forum for this question. I have been asked > >> to write a program that implements Warshall's algorithm using Ada. > > > In any case, what you could do is use Ada.Containers to handle the > > problem: > [...] > > The rest is left to you. > > The algorithm, as described in Wikipedia, relies on a 2-D array of > Boolean, which sounds a much more straightforward approach. > > OP is likely to have a lot more trouble dealing with the data input, > I'd've thought. > > I couldn't tell from the description of the input whether that was three > examples of order-3 problems or one example of an order-9 > problem. Whatever, it'd be simpler if the input was in pairs, one per > line, without the => to distract; read the file once to get the > dimensions, create an array of the right size (probably on the heap), > read again to populate the array, Warshall, bob's your uncle. It is three diffent sets of data. I think I may try to simplify the input data to a 0,1 2d array for each set, read the set in and then process each set writing it to an output file (the last two I will have to figure out). Thanks for the reponse.