Note
This page is a draft and under revision.
Note
This function is not yet supported.
Returns the number of triads between a node NId and a subset of its neighbors GroupSet
Parameters:
A Snap.py graph or a network
Id of the node
A subset of its neighbors of node NId
Number of triads (NId, G1, G2), where G1 and G2 are in GroupSet
Number of triads (NId, G1, O1), where G1 in GroupSet and O1 not in GroupSet
Number of triads (NId, O1, O2), where O1 and O2 are not in GroupSet
Return value:
Unexpected behaviors:
The following example shows how to calculate the number of triads between a node NId and a subset of its neighbors GroupSet:
import snap
Graph = snap.GenRndGnm(snap.PNGraph, 100, 1000)
NId = Graph.Nodes().next().GetId()
GroupSet = snap.TIntSet()
inGroupEdges = snap.TInt()
inOutGroupEdges = snap.TInt()
outGroupEdges = snap.TInt()
snap.GetNodeTriads(Graph, NId, GroupSet, inGroupEdges, inOutGroupEdges, outGroupEdges)