1.3. igraph_maximal_cliques — Find all maximal cliques of a graph

int igraph_maximal_cliques(const igraph_t *graph, igraph_vector_ptr_t *res);

A maximal clique is a clique which can't be extended any more by adding a new vertex to it. This is actually implemented by looking for a maximal independent vertex set in the complementer of the graph.

If you are only interested in the size of the largest clique in the graph, use igraph_clique_number() instead.

Arguments: 

graph:

The input graph.

res:

Pointer to a pointer vector, the result will be stored here, ie. res will contain pointers to igraph_vector_t objects which contain the indices of vertices involved in a clique. The pointer vector will be resized if needed but note that the objects in the pointer vector will not be freed.

Returns: 

Error code.

See also: 

igraph_maximal_independent_vertex_sets(), igraph_clique_number()

Time complexity: TODO.