wlanslovenija/PiplMesh — pull request #256 by BorisMarn (2012-07-12 15:49:30+00:00)
Title: added test for get_closest_node, added get_closest_node, renamed RandomNodeBackend to NodeBackened

Added a few things:
1. I think that class name RandomNodesBackend is not properly named... Not when you have methods get_source_node, get_closest_node & get node in there. Named it NodesBackend. I consider naming false even if all methods would return random node (and they dont and they didnt) .

2. Because we still are dependendt on getting some random node i added function get random_node. For now get_sorce_node calls get random node and is documented that it should be fixed

3. changed method get_closest_node so it returns closest node by iterating through all nodes and looking for closest.

4. Added test_get_closest_node that randomly checks 10 nodes if closest has been found

My first commit and will work on code even more.