[Lemon-user] New User - Simple Questions
Jyujinkai Shikmia
jyujinkai at gmail.com
Tue Aug 7 22:07:54 CEST 2012
HI there...
I am a hobby programmer and not the most experienced. I have been
looking at Lemon to drive the path finding for a hobby game project I am
using, but I am confused at how to enter my map data.
My understanding of a "directed" graph is that you have a node, and it
can link or not link to another node and then you have a weight on it...
Example...
A B C
A 0 1 0
B 1 0 5
C 0 0 0
In this... A is connected to B with a weight of 1, C is connected to
nothing.. so once you get to C you are stuck, and B connects to A wit ha
value of 1 and B connects to C with a value of 5....
The tutorial say to do something like this...
ListDigraph g;
ListDigraph::Node A = g.addNode();
ListDigraph::Node B = g.addNode();
ListDigraph::Node C = g.addNode();
So now I have a graph "g" with the three nodes... so um... now what?
Where / How do I add the connectivity information as well as the weight
values...
Thanks in advance!
--Jynks
More information about the Lemon-user
mailing list