Add getter which returns a node based on a given id

This commit is contained in:
Robert Machmer 2015-12-24 03:24:57 +01:00
parent 729afd59af
commit 35868a4360

View File

@ -173,6 +173,13 @@ function Graph.new()
func( edges, nodes ); func( edges, nodes );
end end
---
-- Returns the node the id is pointing to.
-- param id - The id to check for.
function self:getNode( id )
return nodes[id];
end
--- ---
-- Gets a node at a certain point in the graph. -- Gets a node at a certain point in the graph.
-- @param x - The x coordinate to check. -- @param x - The x coordinate to check.