Graph with static number of vertices and edges.
Graph format based on the internal format of dejavu (sgraph
), but adding sanity checks and easy access to the construction. Essentially, this class provides a more convenient interface to construct sgraph
s.
The graph must first be initialized (either using the respective constructor or using initialize_graph). For the initialization, the final number of vertices or edges must be given. The number of vertices or edges can not be changed. Then, using add_vertex and add_edge, the precise number of defined vertices and edges must be added. The add_vertex(color, deg)
function requires a color and a degree. Both can not be changed later.
The add_edge(v1, v2)
function adds an undirected edge from v1
to v2
. It is always required that v1 < v2
holds, to prevent the accidental addition of hyper-edges.
After the graph was built, the internal sassy graph (sgraph) can be accessed either by the user, or the provided functions. Once the graph construction is finished, the internal sgraph can be changed arbitrarily.
Definition at line 292 of file graph.h.