Computes the triangle participation ratio (proportion of vertices that belong to a triangle). The computation is done to the subgraphs induced by each of the communities in the given partition.
triangle_participation_ratio_communities(g, com)
A vector containing the triangle participation ratio of each community.
The input graph (as an igraph object). Edge weights and directions are ignored.
Community membership vector. Each element corresponds to a vertex of the graph, and contains the index of the community it belongs to.