[Freeciv-Dev] Re: [RFC] Path finding interface
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 10 Apr 2002, Raimar Falke wrote:
> On Wed, Apr 10, 2002 at 12:14:44PM +0100, Gregory Berkolaiko wrote:
> > Read your latest path_finding3.h
> > Still not sure how get_next_path is supposed to be used?
>
> You have the source and the destination. You pass the source to
> pf_get_map and the destination to pf_get_path_from_map. From
> pf_get_path_from_map you will get the path. After this you destroy the
> map.
Raimar, it would really help if you occasionally read the questions before
writing the answer. Please answer the original question.
> > Is it just very expensive version of my get_next_location?
And this one. I mean: does get_next_path actually returns a path?
> > Is the map supposed to be ready by the time you call it?
Well, at least this question is answered.
> The map is constructed lazy. This means that pf_get_map will do no
> calculation and only setup the internal structs. Lets call one loop
> iteration of "while (get_from_mapqueue(&x, &y)) {" in
> really_generate_warmap an step. Than pf_get_path_from_map will execute
> as many steps as nessary to reach the
> destination. pf_get_next_path_from_map will do one step.
Ok, this makes sense.
[..]
> provide provide iterators not only for one step but also for multiple
> targets. Just thing of this example: you have a settler which want
> itself to add to some city. You have the start position and multiple
> destinations on the same continent. You don't have to calculate all
> costs to reach all tiles of the continent. You may use the simple
> iterator but pf_get_path_from_map will do this for you.
how will get_path do it?
G.
- [Freeciv-Dev] Re: [RFC] Path finding interface, (continued)
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Jason Short, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Gregory Berkolaiko, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Ross W. Wetmore, 2002/04/11
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/11
- [Freeciv-Dev] Re: [RFC] Path finding interface, Gregory Berkolaiko, 2002/04/11
- Message not available
- [Freeciv-Dev] Re: [RFC] Path finding interface, Ross W. Wetmore, 2002/04/11
- [Freeciv-Dev] Re: [RFC] Path finding interface, Gregory Berkolaiko, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Gregory Berkolaiko, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Gregory Berkolaiko, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Raimar Falke, 2002/04/10
- [Freeciv-Dev] Re: [RFC] Path finding interface, Daniel L Speyer, 2002/04/10
- Message not available
- [Freeciv-Dev] Re: [RFC] Path finding interface, Ross W. Wetmore, 2002/04/11
[Freeciv-Dev] Re: [RFC] Path finding interface, Gregory Berkolaiko, 2002/04/09
|
|