depth_first

emlib.graphlib.depth_first(start, end, neighborsfunc, maxsize=0)[source]

Find ways between start and end

Parameters:
  • start – the start node

  • end – the end node

  • neighborsfunc – a function returning the neighbors of a node neighbors = neighborsfunc(node)

  • maxsize – the max. size of the connection. 0 to leave it unbound

Returns:

a list of connections, where a conection is a list nodes starting with start and ending with end