4.2. igraph_isoclass — Determine the isomorphism class of a graph with 3 or 4 vertices

int igraph_isoclass(const igraph_t *graph, igraph_integer_t *isoclass);

All graphs with a given number of vertices belong to a number of isomorpism classes, with every graph in a given class being isomorphic to each other.

This function gives the isomorphism class (a number) of a graph. Two graphs have the same isomorphism class if and only if they are isomorphic.

The first isomorphism class is numbered zero and it is the empty graph, the last isomorphism class is the full graph. The number of isomorphism class for directed graphs with three vertices is 16 (between 0 and 15), for undirected graph it is only 4. For graphs with four vertices it is 218 (directed) and 11 (undirected).

Arguments: 

graph:

The graph object.

isoclass:

Pointer to an integer, the isomorphism class will be stored here.

Returns: 

Error code.

See also: 

igraph_isomorphic(), igraph_isoclass_subgraph(), igraph_isoclass_create(), igraph_motifs_randesu().

Because of some limitations this function works only for graphs with three of four vertices.

Time complexity: O(|E|), the number of edges in the graph.