First draft, I'm not sure it's complete. In particular, I havent checked
whether all the parameters of some of the more complicated methods (e.g.,
dfs/bfs order in visits) are supported by the current implementation.
Please check and let me know what else I should remove.