g = complementGraph G
h = complementGraph H
The function complementGraph finds the complement of a graph and hypergraph. Note that this function behaves differently depending upon the type of input. When applied to a graph, complementGraph returns the graph whose edge set is the set of edges not in G. When applied to a hypergraph, the edge set is found by taking the complement of each edge of H in the vertex set.
|
|
|
|
|
Notice that complementGraph works differently on graphs versus hypergraphs.
The object complementGraph is a method function.