3.9. igraph_subisomorphic_function_vf2 — Generic VF2 function for subgraph isomorphism problems

int igraph_subisomorphic_function_vf2(const igraph_t *graph1, 
				      const igraph_t *graph2,
				      igraph_vector_t *map12,
				      igraph_vector_t *map21,
				      igraph_isohandler_t *function,
				      void *arg);

This function is the pair of igraph_isomorphic_function_vf2(), for subgraph isomorphism problems. It searches for subgraphs of graph1 which are isomorphic to graph2. When it founds an isomorphic mapping it calls the supplied callback function. The mapping (and its inverse) and the additional arg argument are supplied to the callback.

Arguments: 

graph1:

The first input graph, may be directed or undirected. This is supposed to be the larger graph.

graph2:

The second input graph, it must have the same directedness as graph1. This is supposed to be the smaller graph.

map12:

Pointer to a vector or NULL. If not NULL, then an isomorphic mapping from graph1 to graph2 is stored here.

map21:

Pointer to a vector ot NULL. If not NULL, then an isomorphic mapping from graph2 to graph1 is stored here.

function:

A pointer to a function of type igraph_isohandler_t. This will be called whenever a subgraph isomorphism is found. If the function returns with a non-zero value then the search is continued, otherwise it stops and the function returns.

arg:

Extra argument to supply to the callback function.

Returns: 

Error code.

Time complexity: exponential.