comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Smart sorting algorithm ?
Date: 8 Jul 2002 21:35:47 -0700
Date: 2002-07-09T04:35:48+00:00	[thread overview]
Message-ID: <5ee5b646.0207082035.65f948ce@posting.google.com> (raw)
In-Reply-To: 3D2A0A25.52A62B7C@despammed.com

Wes Groleau <wesgroleau@despammed.com> wrote in message news:<3D2A0A25.52A62B7C@despammed.com>...
> > Anyone know anything about a sorting algorithm
> > that includes the ability to infer the answer
> > to a comparison from comparisons already done?
> 
> I solved this part.  Wrote an "<" that
> first checks a 2D lookup table.  If the 
> answer is "unknown" it does the comparison,
> then updates as many cells in the table as
> possible.  Once you compare A & B, you may
> be able to determine (and record) the
> order of A,C based on B,C or vice versa.

That's just got to be a non-optimal solution. You just
can't get below NlogN comparisons this way, so why not
just use a decent NlogN comparison algorithm in the first
place (e.g. GNAT.Heap_Sort_A). I think you are wasting
your time here.



  reply	other threads:[~2002-07-09  4:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-02 16:32 Smart sorting algorithm ? Wes Groleau
2002-07-02 17:00 ` achrist
2002-07-02 20:00   ` Wes Groleau
2002-07-02 21:57     ` achrist
2002-07-02 22:22       ` Wes Groleau
2002-07-02 22:57         ` achrist
2002-07-03 14:25           ` Wes Groleau
2002-07-08 17:36       ` Ron
2002-07-02 20:48   ` Florian Weimer
2002-07-02 17:21 ` Wilhelm Spickermann
2002-07-02 20:01   ` Wes Groleau
2002-07-02 20:22     ` Tarjei T. Jensen
2002-07-06 13:40       ` Robert Dewar
2002-07-02 18:57 ` Florian Weimer
2002-07-02 20:08   ` Wes Groleau
2002-07-08 21:54 ` Wes Groleau
2002-07-09  4:35   ` Robert Dewar [this message]
2002-07-09  7:51   ` tmoran
2002-07-09 14:48   ` Ron
2002-07-10 14:38     ` Wes Groleau
2002-07-10 18:08       ` tmoran
2002-07-10 22:14         ` Wes Groleau
2002-07-09 18:59   ` Ron
2002-07-11 14:40     ` Wes Groleau
2002-07-11 20:04       ` Robert Dewar
2002-07-15 19:37         ` Wes Groleau
2002-07-15 22:08           ` achrist
  -- strict thread matches above, loose matches on Subject: below --
2002-07-02 17:50 Gautier direct_replies_not_read
replies disabled

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