Note
This page is a draft and under revision.
Note
This function is not yet supported.
Computes the number of open and closed triads for every node in Graph. Considers the graph as undirected.
Parameters:
A Snap.py graph or a network.
The number of closed triads.
The number of open triads.
If !=-1 then compute triads only for a random sample of SampleNodes nodes. Useful for approximate but quick computations.
Return value:
The following example shows how to compute the number of open and closed triads for nodes in TNGraph, TUNGraph, and TNEANet:
import snap
Graph = snap.GenRndGnm(snap.PNGraph, 100, 1000)
snap.GetTriads(Graph)