cliques_containing_node(G, nodes=None, cliques=None)[source]#

Returns a list of cliques containing the given node.

Deprecated since version 3.0: cliques_containing_node is deprecated and will be removed in 3.2. Use the result of find_cliques directly to compute the cliques that contain each node:

{n: [c for c in nx.find_cliques(G) if n in c] for n in G}

Returns a single list or list of lists depending on input nodes. Optional list of cliques can be input if already computed.