NetworkX

Previous topic

networkx.node_clique_number

Next topic

networkx.cliques_containing_node

networkx.number_of_cliques

number_of_cliques(G, nodes=None, cliques=None, with_labels=False)

Returns the number of maximal cliques for each node.

Returns a single or list depending on input nodes. Returns a dict keyed by node if “with_labels=True”. Optional list of cliques can be input if already computed.