powered by
Counts the number of all possible signed triangles (+++),(++-), (+--) and (---)
count_signed_triangles(g)
counts for all 4 signed triangle types
igraph object with signed edge attribute
David Schoch
signed_triangles
library(igraph) g <- graph.full(4) E(g)$sign <- c(-1,1,1,-1,-1,1) count_signed_triangles(g)
Run the code above in your browser using DataLab