% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topology.R
\name{isomorphisms}
\alias{isomorphisms}
\alias{graph.get.isomorphisms.vf2}
\title{Calculate all isomorphic mappings between the vertices of two graphs}
\usage{
isomorphisms(graph1, graph2, method = "vf2", ..., callback = NULL)
}
\arguments{
\item{graph1}{The first graph.}

\item{graph2}{The second graph.}

\item{method}{Currently only \sQuote{vf2} is supported, see
\code{\link[=isomorphic]{isomorphic()}} for details about it and extra arguments.}

\item{...}{Extra arguments, passed to the various methods.}

\item{callback}{Optional callback function to call for each isomorphism found.
If provided, the function should accept two arguments: \code{map12} (integer vector
mapping vertex IDs from graph1 to graph2, 1-based indexing) and \code{map21}
(integer vector mapping vertex IDs from graph2 to graph1, 1-based indexing).
The function should return \code{FALSE} to continue the search or \code{TRUE} to stop it.
If \code{NULL} (the default), all isomorphisms are collected and returned as a list.
Only supported for \code{method = "vf2"}.

\strong{Important limitation:} Callback functions must NOT call any igraph
functions (including simple queries like \code{vcount()} or \code{ecount()}). Doing
so will cause R to crash due to reentrancy issues. Extract
any needed graph information before calling the function with a callback, or
use collector mode (the default) and process results afterward.}
}
\value{
If \code{callback} is \code{NULL}, returns a list of vertex sequences, corresponding
to all mappings from the first graph to the second. If \code{callback} is provided,
returns \code{NULL} invisibly.
}
\description{
Calculate all isomorphic mappings between the vertices of two graphs
}
\section{Related documentation in the C library}{
\href{https://igraph.org/c/html/0.10.17/igraph-Isomorphism.html#igraph_get_isomorphisms_vf2}{\code{get_isomorphisms_vf2()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_edges}{\code{edges()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_get_eids}{\code{get_eids()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}
}

\seealso{
Other graph isomorphism: 
\code{\link{canonical_permutation}()},
\code{\link{count_isomorphisms}()},
\code{\link{count_subgraph_isomorphisms}()},
\code{\link{graph_from_isomorphism_class}()},
\code{\link{isomorphic}()},
\code{\link{isomorphism_class}()},
\code{\link{subgraph_isomorphic}()},
\code{\link{subgraph_isomorphisms}()}
}
\concept{graph isomorphism}
