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 07:54:13 -0700 (PDT)
Date: 2016-09-23T07:54:13-07:00	[thread overview]
Message-ID: <846376d4-9fe1-4ffc-ab82-e5e9e9f77d2e@googlegroups.com> (raw)
In-Reply-To: <0e690fe0-7ac8-4843-8792-50ae14729bcc@googlegroups.com>

On Thursday, September 22, 2016 at 11:31:53 PM UTC-5, Shark8 wrote:
> 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.

It is a homework of sorts, but not in the way you'd normally think.  The instructor uses Ada when teaching algorithms for the examples but he expects you to teach yourself Ada on your own while trying to learn the algorithms. This is a bit daunting when you don't know what the language can and cannot do.

Thanks for the help, I appreciate it.  

  parent reply	other threads:[~2016-09-23 14:54 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
2016-09-25 16:06       ` Stephen Leake
2016-09-26 20:40         ` Simon Wright
2016-09-23 14:54   ` James Brewer [this message]
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