1. igraph_dyad_census — Calculating the dyad census as defined by Holland and Leinhardt

int igraph_dyad_census(const igraph_t *graph, igraph_integer_t *mut,
		       igraph_integer_t *asym, igraph_integer_t *null);

Dyad census means classifying each pair of vertices of a directed graph into three categories: mutual, there is an edge from a to b and also from b to a; asymmetric, there is an edge either from a to b or from b to a but not the other way and null, no edges between a and b.

Holland, P.W. and Leinhardt, S. (1970). A Method for Detecting Structure in Sociometric Data. American Journal of Sociology, 70, 492-513.

Arguments: 

graph:

The input graph, a warning is given if undirected as the results are undefined for undirected graphs.

mut:

Pointer to an integer, the number of mutual dyads is stored here.

asym:

Pointer to an integer, the number of asymmetric dyads is stored here.

null:

Pointer to an integer, the number of null dyads is stored here.

Returns: 

Error code.

See also: 

igraph_reciprocity(), igraph_triad_census().

Time complexity: O(|V|+|E|), the number of vertices plus the number of edges.