"ricky" <ra*****@yahoo. comwrote in message
news:11******** **************@ l77g2000hsb.goo glegroups.com.. .
Hi,
I am student and I am doing a final year project on Zig-bee. I have to
write low energy routing algorithms. I need to write routing algorithm
for LEACH.
If anybody can help with some links where I can find basics on how to
write routing algorithms. It will be great.
I have tried to search alot on google but can't find any good links.
There are lot of links that talk about the theory aspects of routing
algorithms. But I am looking from programming point of view. I need to
understand how to write codes for routing algorithms.
I am a final year and this network programming is very new to me.
I'll really appreciate if anyone could provide some information or
sample codes.
Define a struct node which consists of a linked list of edges to and edges
from, and a pointer to hang arbitrary data off.
Define a struct edge which consists of a distance, a node to and a node
from, and a next pointer because we store edges in a linked list.
Dust off Skiena's book on algorithms and look for shortest path. It is
NP-complete so unless your network is very small you will have to use
approximations.
Now we're into algorithmic rather than C issues, so implement a slow or
inaccurate version as proof of concept, and then try comp.programmin g for a
better algorithm.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm