4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
24 Graph() : numedges_(0) {};
26 typedef std::vector<int> EdgePath;
27 /// \return a vector of the vertices from which "to" can be reached
28 std::vector<int> const getReachableTo(int to, bool clear_visited);
29 /// \return a vector of the vertices that can be reached from "from"
30 std::vector<int> const
31 getReachable(int from, bool only_viewable, bool clear_visited);
32 /// Can "from" be reached from "to"?
33 bool isReachable(int from, int to);
34 /// Find a path from "from" to "to".
35 EdgePath const getPath(int from, int to);
36 /// Called repeatedly to build the graph.
37 void addEdge(int from, int to);
38 /// Reset the internal data structures.
43 int bfs_init(int, bool clear_visited = true);
48 std::vector<int> in_vertices;
49 std::vector<int> out_vertices;
50 std::vector<int> out_edges;
53 static std::vector<Vertex> vertices_;
55 std::vector<bool> visited_;