sf.apps.clique.c_0

c_0(clique, graph)[source]

Generates the set \(C_0\) of nodes that are connected to all nodes in the input clique subgraph.

The set \(C_0\) is defined in [13] and is used to determine nodes that can be added to the current clique to grow it into a larger one.

Example usage:

>>> graph = nx.complete_graph(10)
>>> clique = [0, 1, 2, 3, 4]
>>> c_0(clique, graph)
[5, 6, 7, 8, 9]
Parameters
  • clique (list[int]) – a subgraph specified by a list of nodes; the subgraph must be a clique

  • graph (nx.Graph) – the input graph

Returns

a list containing the \(C_0\) nodes for the clique

Return type

list[int]