X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FGraph.h;h=50d8bf855da73919e7ac67a5f3bdfc77f6ad2ee3;hb=10be0c43f20a27a1e6af82241ad5ec6b5cad3eca;hp=e999f39a338a81c011aaab6917e4e514674d31b6;hpb=2cd88f07b3a7c862584a20d6b1050ce71f8d42e1;p=lyx.git diff --git a/src/Graph.h b/src/Graph.h index e999f39a33..50d8bf855d 100644 --- a/src/Graph.h +++ b/src/Graph.h @@ -16,6 +16,7 @@ #include #include +#include #include @@ -30,10 +31,10 @@ public: /// typedef std::vector EdgePath; /// \return a vector of the vertices from which "to" can be reached - std::vector const getReachableTo(int to, bool clear_visited); - /// \return a vector of the vertices that can be reached from "from" - std::vector const - getReachable(int from, bool only_viewable, bool clear_visited); + EdgePath const getReachableTo(int to, bool clear_visited); + /// \return a vector of the reachable vertices, avoiding all "excludes" + EdgePath const getReachable(int from, bool only_viewable, + bool clear_visited, std::set excludes = std::set()); /// can "from" be reached from "to"? bool isReachable(int from, int to); /// find a path from "from" to "to". always returns one of the @@ -46,9 +47,7 @@ public: private: /// - bool bfs_init(int, bool clear_visited, std::queue* Q); - /// used to recover a marked path - void getMarkedPath(int from, int to, EdgePath & path); + bool bfs_init(int, bool clear_visited, std::queue & Q); /// these represent the arrows connecting the nodes of the graph. /// this is the basic representation of the graph: as a bunch of /// arrows.