triad.census {igraph} | R Documentation |
This function counts the different subgraphs of three vertices in a graph.
triad.census(graph)
graph |
The input graph, it should be directed. An undirected graph results a warning, and undefined results. |
Triad census was defined by David and Leinhardt (see References below). Every triple of vertices (A, B, C) are classified into the 16 possible states:
003A,B,C, the empty graph.
012A->B, C, the graph with a single directed edge.
102A<->B, C, the graph with a mutual connection between two vertices.
021DA<-B->C, the out-star.
021UA->B<-C, the in-star.
021CA->B->C, directed line.
111DA<->B<-C.
111UA<->B->C.
030TA->B<-C, A->C.
030CA<-B<-C, A->C.
201A<->B<->C.
120DA<-B->C, A<->C.
120UA->B<-C, A<->C.
120CA->B->C, A<->C.
210A->B<->C, A<->C.
300A<->B<->C, A<->C, the complete graph.
This functions uses the RANDESU motif finder algorithm to find and
count the subgraphs, see graph.motifs
.
A numeric vector, the subgraph counts, in the order given in the above description.
Gabor Csardi csardi@rmki.kfki.hu
See also Davis, J.A. and Leinhardt, S. (1972). The Structure of Positive Interpersonal Relations in Small Groups. In J. Berger (Ed.), Sociological Theories in Progress, Volume 2, 218-251. Boston: Houghton Mifflin.
dyad.census
for classifying binary relationships,
graph.motifs
for the underlying implementation.
g <- erdos.renyi.game(15, 45, type="gnm", dir=TRUE) triad.census(g)