\HeaderA{constraint}{Burt's constraint}{constraint}
\keyword{graphs}{constraint}
\begin{Description}\relax
Given a graph, \code{constraint} calculates Burt's constraint for
each vertex.
\end{Description}
\begin{Usage}
\begin{verbatim}
constraint(graph, nodes=V(graph), weights=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{graph}] A graph object, the input graph.
\item[\code{nodes}] The vertices for which the constraint will be
calculated. Defaults to all vertices.
\item[\code{weights}] The weights of the edges. If this is \code{NULL} and
there is a \code{weight} edge attribute this is used. If there is no
such edge attribute all edges will have the same weight.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Burt's constraint is higher if ego has less, or mutually
stronger related (i.e. more redundant) contacts. Burt's measure of
constraint, \eqn{C_i}{}, of vertex \eqn{i}{}'s ego network
\eqn{V_i}{}, is defined for directed and valued graphs,
\deqn{C_i=\sum_{j \in V_i \setminus \{i\}} (p_{ij}+\sum_{q \in V_i
\setminus \{i,j\}} p_{iq} p_{qj})^2}{}
for a graph of order (ie. number of vertices) \eqn{N}{}, where
proportional tie strengths are defined as 
\deqn{p_{ij} = \frac{a_{ij}+a_{ji}}{\sum_{k \in V_i \setminus \{i\}}(a_{ik}+a_{ki})},}{}
\eqn{a_{ij}}{} are elements of \eqn{A}{} and the latter being the
graph adjacency matrix. For isolated vertices, constraint is undefined.
\end{Details}
\begin{Value}
A numeric vector of constraint scores
\end{Value}
\begin{Author}\relax
Jeroen Bruggeman \email{j.p.bruggeman@uva.nl} and Gabor Csardi
\email{csardi@rmki.kfki.hu}
\end{Author}
\begin{References}\relax
Burt, R.S. (2004). Structural holes and good ideas. \emph{American
Journal of Sociology} 110, 349-399.
\end{References}
\begin{Examples}
\begin{ExampleCode}
g <- erdos.renyi.game(20, 5/20)
constraint(g)
\end{ExampleCode}
\end{Examples}

