In my program there are 4 fixed nodes and 12 mobile nodes.I am trying to code many wireless cells. I want to find the nearest fixed node for the mobile nodes. how can i do this?
Asked
Active
Viewed 600 times
1 Answers
0
If you only have 4 fixed nodes you might as well compute the euclidean distance to each of them and pick the one with the least distance. If you need to work with more fixed nodes, consider using a space-partitioning data structure such as http://en.wikipedia.org/wiki/R-tree or http://en.wikipedia.org/wiki/K-d_tree. You should be able to find them in a library for your favorite programming language.

Jakob Erdmann
- 190
- 1
- 7