Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] Re: Goto algorithm with priority queues
Home

[Freeciv-Dev] Re: Goto algorithm with priority queues

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Goto algorithm with priority queues
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 08 Jun 2000 22:39:18 +0200

Thue Janus Kristensen <thue@xxxxxxx> writes:

> On Thu, 08 Jun 2000, Falk Hueffner wrote:
> > 
> > Hi,
> > 
> > here's a demonstration of a goto algorithm using priority queues. It
> > is reasonably fast for my test cases. It finds an optimal path from a
> > certain point on the map to all others (but only one). I really tried
> > hard to make the code readable, so please tell me if someting is
> > unclear...
> > 
> > The file is a self contained .c file for testing purposes. Before
> > trying to optimize it further, it really would need to be integrated
> > first to have reasonable test cases.
> 
> I don't see why you didn't code it straight into freeciv; that patch look
> like alot more work than a direct insertion would have taken. :)

Not really. Also, it compiled a lot faster :)

> Hmm; lots of logaritmic time. I think it can be done in constant
> time by limiting maxcost and using a little extra memory. (for our
> purposes).

I don't understand. Could you probably explain it?

> Darn, now I'll have to make a patch to prove it... :)

Or that... :)

        Falk



[Prev in Thread] Current Thread [Next in Thread]