Skip to content
Snippets Groups Projects
Commit 19521863 authored by Christoph Lehmann's avatar Christoph Lehmann
Browse files

[NL] added docu

parent 254995d5
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,12 @@ bool hasTopologicalOrdering(std::vector<std::vector<int>> const& graph) ...@@ -76,6 +76,12 @@ bool hasTopologicalOrdering(std::vector<std::vector<int>> const& graph)
enum class TraversePosition { StartNode, BetweenChildren, EndNode }; enum class TraversePosition { StartNode, BetweenChildren, EndNode };
/*! Traverses the graph given by the adjacency list \c map_sink_source in a
* depth-first manner starting at the node \c sink_fct.
*
* At the beginning and end of each node as well as between every two child
* nodes the given \c callback is called.
*/
template <typename Callback> template <typename Callback>
void traverse(std::vector<std::vector<int>> const& map_sink_source, void traverse(std::vector<std::vector<int>> const& map_sink_source,
int sink_fct, Callback&& callback) int sink_fct, Callback&& callback)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment