X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FGraph.h;h=2f5de3de36fd6812eee65ed114a771e7ffcf9b33;hb=a128c373f9e3563a52405a485d9a672e210208b0;hp=239cbcb90a095de706785ccc7e6a95e5597fe746;hpb=57a29ac9a608b81ea847b1c041f5e61a1ac6abf0;p=lyx.git diff --git a/src/Graph.h b/src/Graph.h index 239cbcb90a..2f5de3de36 100644 --- a/src/Graph.h +++ b/src/Graph.h @@ -16,6 +16,7 @@ #include #include +#include #include @@ -31,9 +32,9 @@ public: typedef std::vector EdgePath; /// \return a vector of the vertices from which "to" can be reached EdgePath const getReachableTo(int to, bool clear_visited); - /// \return a vector of the vertices that can be reached from "from" - EdgePath const - getReachable(int from, bool only_viewable, 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 @@ -48,17 +49,17 @@ private: /// 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 + /// this is the basic representation of the graph: as a bunch of /// arrows. struct Arrow { /// - Arrow(int f, int t, int i): + Arrow(int f, int t, int i): from(f), to(t), id(i) {} /// the vertex at the tail of the arrow int from; /// the vertex at the head int to; - /// an id for this arrow, e.g., for use in describing paths + /// an id for this arrow, e.g., for use in describing paths /// through the graph int id; }; @@ -86,7 +87,7 @@ private: /// of Format, this is easy, since the Format objects already have ints /// as identifiers.) std::vector vertices_; - + /// a counter that we use to assign id's to the arrows /// FIXME This technique assumes a correspondence between the /// ids of the arrows and ids associated with Converters that