cbbowen / graph

Efficient, header-only graph library for C++17 with a pleasant interface.
MIT License
16 stars 3 forks source link

Support for trees #1

Closed cbbowen closed 6 years ago

cbbowen commented 6 years ago

Add support for trees, acyclic graphs where all but the unique root vertex has associated with it a parent edge for which it is the head (for out-trees) or tail (for in-trees). This should take the form of two new traits, Out_tree and In_tree. These concepts can be extended to forests by allowing arbitrarily many roots. The outputs of shortest_paths_from and shortest_paths_to should then satisfy Out_tree and In_tree, respectively.