allow sets of tops on edges

This commit is contained in:
Alex Coyte
2016-09-01 14:58:55 +10:00
committed by Matthew Barr
parent aca89e66d2
commit c94899dd44
31 changed files with 284 additions and 200 deletions

View File

@@ -198,9 +198,13 @@ VertexIndexOrdering<Graph> make_index_ordering(const Graph &g) {
bool onlyOneTop(const NGHolder &g);
/** Return a mask of the tops on the given graph. */
/** Return the set of the tops on the given graph. */
flat_set<u32> getTops(const NGHolder &h);
/** Initialise the tops on h to the provide top. Assumes that h is triggered and
* no tops have been set on h. */
void setTops(NGHolder &h, u32 top = DEFAULT_TOP);
/** adds a vertex to g with all the same vertex properties as \p v (aside from
* index) */
NFAVertex clone_vertex(NGHolder &g, NFAVertex v);
@@ -319,6 +323,12 @@ bool hasCorrectlyNumberedVertices(const NGHolder &g);
*/
bool hasCorrectlyNumberedEdges(const NGHolder &g);
/**
* Assertion: returns true if the graph is triggered and all edges out of start
* have tops OR if the graph is not-triggered and all edges out of start have no
* tops.
*/
bool isCorrectlyTopped(const NGHolder &g);
#endif // NDEBUG
} // namespace ue2