fg.triangle | R Documentation |
Count the number of triangles on each vertex in a graph.
fg.triangles(graph, type = "cycle")
graph |
The FlashGraph object |
type |
The type of triangles. It is ignored for undirected graphs. |
Triangle counting works for both directed and undirected graphs. For directed graphs, this counts the number of cycle triangles, shown below. A -> B ^ / | v C
A numeric vector that contains the number of triangles associated with each vertex.
Da Zheng <dzheng5@jhu.edu>