[Freeciv-Dev] Re: [RFC] Move cost map interface
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Apr 12, 2002 at 01:56:46PM +0100, Gregory Berkolaiko wrote:
> On Thu, 11 Apr 2002, Ross W. Wetmore wrote:
> > Ditch any separate queue entry objects like in the current code.
> > Each costmap location should contain a next index used to chain
> > it into the (bucket) lists, and there is no need to store x,y
> > values as the indexed location gives this implicitly. You
> > probably want a uchar_t from,dest; for iterating forwards and
> > backwards through the final map, as well as ushort_t next; and
> > int cost (or maybe struct cost to hold costfn specific extensions).
> > This makes up your basic struct cost_tile where a vector of
> > cost_tiles == a cost_map contains all the useful/necessary warmap
> > generated data that you might want to save for reuse. (The rest of
> > the warmap parameterization can be shared or reproduced as needed
> > with little or no effort).
>
> There is a great advantage I see in this approach:
> after you've computed the whole map, these links "next" and "prev" order
> the locations in the "right" order, so you can make another iterate
> without computing any new costs.
If I understand this in the correct way my goto_agent has this
feature:
+struct cell {
+ struct position pos;
+ int turns, points_left, railroad, steps;
+ struct cell *prev;
+ int dir_from_prev_to_pos;
+};
But this is an implementation thing and has nothing to do with the
interface.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"The very concept of PNP is a lovely dream that simply does not translate to
reality. The confusion of manually doing stuff is nothing compared to the
confusion of computers trying to do stuff and getting it wrong, which they
gleefully do with great enthusiasm."
-- Jinx Tigr in the SDM
Message not available
Message not available[Freeciv-Dev] Re: [RFC] Move cost map interface, Ross W. Wetmore, 2002/04/12
[Freeciv-Dev] Re: [RFC] Move cost map interface, Raimar Falke, 2002/04/13
[Freeciv-Dev] Re: [RFC] Move cost map interface, Ross W. Wetmore, 2002/04/14
[Freeciv-Dev] Re: [RFC] Move cost map interface, Raimar Falke, 2002/04/14
[Freeciv-Dev] Re: [RFC] Move cost map interface, Gregory Berkolaiko, 2002/04/15
Message not available[Freeciv-Dev] Re: [RFC] Move cost map interface, Ross W. Wetmore, 2002/04/15
[Freeciv-Dev] Re: [RFC] Move cost map interface, Raimar Falke, 2002/04/16
[Freeciv-Dev] Re: [RFC] Path finding interface #6, Raimar Falke, 2002/04/13
[Freeciv-Dev] Re: [RFC] Path finding interface #9, Raimar Falke, 2002/04/27
|
|