From: tmoran@acm.org
Subject: Re: Parallel Merge Sort
Date: Mon, 18 Feb 2002 22:55:11 GMT
Date: 2002-02-18T22:55:11+00:00 [thread overview]
Message-ID: <jDfc8.55$cP4.51531921@newssvr14.news.prodigy.com> (raw)
In-Reply-To: a4rq83$cis$1@star.cs.vu.nl
Your Sort_Package declares an array type that it knows how to sort, which
means that anyone using it must use its array type. Take a look at
Barnes' "Programming in Ada 95", 2nd edition, p. 396, or "A generic
sorting procedure" in John English's "Ada 95 The Craft of Object-Oriented
Programming" (online via www.adapower.com) where they take the more
general approach of passing in the array type as a parameter:
generic
type Index is (<>);
type Item is private;
type Collection is array(Index range <>) of Item;
with function "<"(X,Y:Item) return Boolean;
procedure Sort(C : in out Collection);
next prev parent reply other threads:[~2002-02-18 22:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-15 21:34 Parallel Merge Sort R. Stegers
2002-02-15 21:46 ` Pat Rogers
2002-02-19 6:16 ` Adrian Hoe
2002-02-19 6:21 ` Adrian Hoe
2002-02-15 23:02 ` tmoran
2002-02-16 11:09 ` R. Stegers
2002-02-18 10:22 ` Peter Hermann
2002-02-18 20:41 ` R. Stegers
2002-02-18 21:02 ` R. Stegers
2002-02-18 22:29 ` Jeffrey Carter
2002-02-18 22:55 ` tmoran [this message]
2002-02-19 21:46 ` Kenneth Almquist
2002-02-24 3:22 ` Nick Roberts
2002-02-26 20:39 ` R. Stegers
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox