From: Shark8 <onewingedshark@gmail.com>
Subject: Re: New to Ada need help implementing Warshall's algorithm
Date: Thu, 22 Sep 2016 21:31:52 -0700 (PDT)
Date: 2016-09-22T21:31:52-07:00 [thread overview]
Message-ID: <0e690fe0-7ac8-4843-8792-50ae14729bcc@googlegroups.com> (raw)
In-Reply-To: <955937c4-b9f9-4e21-9d22-98382df2f45f@googlegroups.com>
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. The problem, I have never written an Ada program and I a limited time frame to put this together.
> I have have the IDE installed and am in the process of writing some rudimentary programs to familiarize myself with the language but I'm afraid that I may run out of time.
>
> The input data I have is a series of connections between 7 to 9 entities that would be stored in a file.
>
> examples: A->B A->D C->D
> alice->bob alice->larry bob -> larry
> 1 -> 3 1 -> 5 2 -> 5
>
> Any help you could offer would be greatly appreciated.
> Thanks
This sounds kind of like homework, is it?
In any case, what you could do is use Ada.Containers to handle the problem:
* Create an enumeration for nodes, perhaps Node_01 to Node_10.
* Instantiate Ada.Containers.Indefinite_Vectors with that enumeration as key and element as string. (This is to associate your input-variables w/ the enumeration.)
* Instantiate Ada.Containers.Ordered_Sets with the enumeration; this is to represent node-connections.
* Instantiate Ada.Containers.Indefinite_Ordered_Maps with the Set-type from the above as the element and the enumeration as the key.
The rest is left to you.
next prev parent reply other threads:[~2016-09-23 4:31 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 [this message]
2016-09-23 6:26 ` Simon Wright
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