sf.apps.clique.is_clique

is_clique(graph)[source]

Determines if the input graph is a clique. A clique of \(n\) nodes has exactly \(n( n-1)/2\) edges.

Example usage:

>>> graph = nx.complete_graph(10)
>>> is_clique(graph)
True
Parameters

graph (nx.Graph) – the input graph

Returns

True if input graph is a clique and False otherwise

Return type

bool