% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/structural-properties.R
\name{which_mutual}
\alias{which_mutual}
\title{Find mutual edges in a directed graph}
\usage{
which_mutual(graph, eids = E(graph), loops = TRUE)
}
\arguments{
\item{graph}{The input graph.}

\item{eids}{Edge sequence, the edges that will be probed. By default is
includes all edges in the order of their ids.}

\item{loops}{Logical, whether to consider directed self-loops to be mutual.}
}
\value{
A logical vector of the same length as the number of edges supplied.
}
\description{
This function checks the reciprocal pair of the supplied edges.
}
\details{
In a directed graph an (A,B) edge is mutual if the graph also includes a
(B,A) directed edge.

Note that multi-graphs are not handled properly, i.e. if the graph contains
two copies of (A,B) and one copy of (B,A), then these three edges are
considered to be mutual.

Undirected graphs contain only mutual edges by definition.
}
\section{Related documentation in the C library}{
\href{https://igraph.org/c/html/0.10.17/igraph-Structural.html#igraph_is_mutual}{\code{is_mutual()}}, \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_vcount}{\code{vcount()}}, \href{https://igraph.org/c/html/0.10.17/igraph-Basic.html#igraph_ecount}{\code{ecount()}}
}

\examples{

g <- sample_gnm(10, 50, directed = TRUE)
reciprocity(g)
dyad_census(g)
which_mutual(g)
sum(which_mutual(g)) / 2 == dyad_census(g)$mut
}
\seealso{
\code{\link[=reciprocity]{reciprocity()}}, \code{\link[=dyad_census]{dyad_census()}} if you just
want some statistics about mutual edges.

Other structural.properties: 
\code{\link{bfs}()},
\code{\link{component_distribution}()},
\code{\link{connect}()},
\code{\link{constraint}()},
\code{\link{coreness}()},
\code{\link{degree}()},
\code{\link{dfs}()},
\code{\link{distance_table}()},
\code{\link{edge_density}()},
\code{\link{feedback_arc_set}()},
\code{\link{feedback_vertex_set}()},
\code{\link{girth}()},
\code{\link{is_acyclic}()},
\code{\link{is_dag}()},
\code{\link{is_matching}()},
\code{\link{k_shortest_paths}()},
\code{\link{knn}()},
\code{\link{reciprocity}()},
\code{\link{subcomponent}()},
\code{\link{subgraph}()},
\code{\link{topo_sort}()},
\code{\link{transitivity}()},
\code{\link{unfold_tree}()},
\code{\link{which_multiple}()}
}
\author{
Gabor Csardi \email{csardi.gabor@gmail.com}
}
\concept{structural.properties}
\keyword{graphs}
