Compute the number of triangles.
Finds the number of triangles that include a node as one of the vertices.
Parameters: | G : graph
nbunch : container of nodes, optional
with_labels: bool, optional :
|
---|---|
Returns: | out : list or dictionary
|
Notes
When computing triangles for the entire graph each triangle is counted three times, once at each node.