[Boost-users] [BGL] Knight's Tour Example

23 views
Skip to first unread message

Brian Troutwine

unread,
Oct 19, 2009, 1:17:52 AM10/19/09
to boost...@lists.boost.org
The Knight's Tour Example given in Siek, Lee and Lumsdaine's book on
the BGL will not compile due to a cyclical dependency between
knight_adjacency_iterator and
knights_tour_graph. Would someone help me to resolve this? This is the
only implicit graph example given in the text and I would very much
like to learn from it.

The text does not give a complete program, only a subset. I was
unable to find a complete listing anywhere and have attached a version
typed by myself to this email.

Thank you,
Brian Troutwine

ps. I would appreciate pointers to further (ideally functioning)
examples of implicit graphs in the BGL. The A-Star search
documentation notes its usefulness for them but fails to provide any
functional example of running the algorithm over such a graph.

main.cpp

K. Noel Belcourt

unread,
Oct 19, 2009, 11:53:46 AM10/19/09
to boost...@lists.boost.org
Hi Brian,

On Oct 18, 2009, at 11:17 PM, Brian Troutwine wrote:

> The Knight's Tour Example given in Siek, Lee and Lumsdaine's book on
> the BGL will not compile due to a cyclical dependency between
> knight_adjacency_iterator and
> knights_tour_graph. Would someone help me to resolve this? This is the
> only implicit graph example given in the text and I would very much
> like to learn from it.
>
> The text does not give a complete program, only a subset. I was
> unable to find a complete listing anywhere and have attached a version
> typed by myself to this email.

If you download Boost, in this directory, boost/libs/graph/example,
you'll find knights-tour.cpp. This may be what you're looking for.

-- Noel


_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Brian Troutwine

unread,
Oct 19, 2009, 2:04:12 PM10/19/09
to boost...@lists.boost.org
> If you download Boost, in this directory, boost/libs/graph/example, you'll
> find knights-tour.cpp. This may be what you're looking for.

Good lord, indeed! Thank you very much, Noel.
--
Brian

Reply all
Reply to author
Forward
0 new messages