These functions find all, the largest or all the maximal cliques in an undirected graph. The size of the largest clique can also be calculated.
1 2 3
The input graph, directed graphs will be considered as undirected ones, multiple edges and loops are ignored.
Numeric constant, lower limit on the size of the cliques to find.
Numeric constant, upper limit on the size of the cliques to find.
cliques find all complete subgraphs in the input graph, obeying the
size limitations given in the
largest_cliques finds all largest cliques in the input graph. A
clique is largest if there is no other clique including more vertices.
max_cliques finds all maximal cliques in the input graph. A
clique in maximal if it cannot be extended to a larger clique. The largest
cliques are always maximal, but a maximal clique is not necessarily the
count_max_cliques counts the maximal cliques.
clique_num calculates the size of the largest clique(s).
The current implementation of these functions searches for maximal
independent vertex sets (see
ivs) in the
return a list containing numeric vectors of vertex ids. Each list element is
a clique, i.e. a vertex sequence of class
NULL, invisibly, if its
argument is not
NULL. The output is written to the specified file in
count_max_cliques return an integer
For maximal cliques the following algorithm is implemented: David Eppstein, Maarten Loffler, Darren Strash: Listing All Maximal Cliques in Sparse Graphs in Near-optimal Time. https://arxiv.org/abs/1006.5440
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.