Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7282) connect as orders
Home

[Freeciv-Dev] Re: (PR#7282) connect as orders

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#7282) connect as orders
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Jan 2004 14:59:50 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7282 >

ue80@xxxxxxxxxxxxxxxxxxxxx wrote:

> So you get a spanning tree of cities when you want to make a railroad
> network?

Indeed.  It will not necessarily be a minimal spanning tree, though.

Algorithm for a minimal spanning tree:

1 Pick a node (city).  This is your initial tree.
2 While there are unconnected nodes:
   3 Pick the node that is closest to your existing tree.
   4 Connect to that node from the closest point on the tree.

Connect skips step 3.

jason




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