powered by
triad census for signed graphs
triad_census_signed(g)
counts for all 139 signed directed triangle types
igraph object with a sign edge attribute.
David Schoch
library(igraph) g <- make_full_graph(4, directed = TRUE) E(g)$sign <- rep(c(-1, 1, 1, -1, -1, 1), 2) triad_census_signed(g)
Run the code above in your browser using DataLab