comp.lang.ada
 help / color / mirror / Atom feed
From: James Brewer <firstvestor@gmail.com>
Subject: Re: New to Ada need help implementing Warshall's algorithm
Date: Fri, 23 Sep 2016 08:07:52 -0700 (PDT)
Date: 2016-09-23T08:07:52-07:00	[thread overview]
Message-ID: <ec6d1235-6923-4f10-9978-e908cc7750ef@googlegroups.com> (raw)
In-Reply-To: <lyzimz5dyq.fsf@pushface.org>

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.

  reply	other threads:[~2016-09-23 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 22:05 New to Ada need help implementing Warshall's algorithm James Brewer
2016-09-23  4:31 ` Shark8
2016-09-23  6:26   ` Simon Wright
2016-09-23 15:07     ` James Brewer [this message]
2016-09-25 16:06       ` Stephen Leake
2016-09-26 20:40         ` Simon Wright
2016-09-23 14:54   ` James Brewer
2018-02-12 17:45     ` Lucretia
2016-09-26 17:38 ` James Brewer
2016-09-26 18:29   ` Stephen Leake
2018-02-12 15:36 ` jre11712
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox