NetworkX

Previous topic

networkx.closeness_centrality

Next topic

networkx.find_cliques

Quick search

CliqueΒΆ

Find and manipulate cliques of graphs.

Note that finding the largest clique of a graph has been shown to be an NP-complete problem; the algorithms here could take a long time to run.

http://en.wikipedia.org/wiki/Clique_problem

find_cliques (G) Search for maximal cliques in a graph.
make_max_clique_graph (G[, create_using, name]) Create the maximal clique graph of a graph.
make_clique_bipartite (G[, fpos, create_using, ...]) Create a bipartite clique graph from a graph G.
graph_clique_number (G[, cliques]) Return the clique number (size the largest clique) for G. Optional list of cliques can be input if already computed.
graph_number_of_cliques (G[, cliques]) Returns the number of maximal cliques in G.
node_clique_number (G[, nodes, with_labels, ...]) Returns the size of the largest maximal clique containing each given node.
number_of_cliques (G[, nodes, cliques, ...]) Returns the number of maximal cliques for each node.
cliques_containing_node (G[, nodes, cliques, ...]) Returns a list of cliques containing the given node.