I'm trying to adapt this git page on simultaneously obtaining a topologically sorted list of incoming vertices whilst topologically sorting. The reason I'm doing this is to compare this implementation of transitive reduction with boost's undocumented version.
I'm trying to edit boost's own topological sort. From what I can tell, all I need to do is to override the discover_vertex or examine_edge functions to append a value to specific vectors depending on the vertex but I'm struggling to do so.
Should I pass in a data structure to the visitor or another OutputIterator? How can I properly override these functions and update either of these two options?
If anybody could shed some light that would be lovely. Many thanks in advance.