comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: New to Ada need help implementing Warshall's algorithm
Date: Fri, 23 Sep 2016 07:26:21 +0100
Date: 2016-09-23T07:26:21+01:00	[thread overview]
Message-ID: <lyzimz5dyq.fsf@pushface.org> (raw)
In-Reply-To: 0e690fe0-7ac8-4843-8792-50ae14729bcc@googlegroups.com

Shark8 <onewingedshark@gmail.com> 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.

  reply	other threads:[~2016-09-23  6:26 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 [this message]
2016-09-23 15:07     ` James Brewer
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