lists all possible signed triangles

signed_triangles(g)

Arguments

g

igraph object with signed edge attribute

Value

matrix of vertex ids and the number of positive ties per triangle

Author

David Schoch

Examples

library(igraph)
g <- graph.full(4)
E(g)$sign <- c(-1,1,1,-1,-1,1)
signed_triangles(g)
#>      V1 V2 V3 P
#> [1,]  1  5  3 1
#> [2,]  1  4  2 1
#> [3,]  2  6  3 3
#> [4,]  4  6  5 1