pymnet.lcc¶
- pymnet.lcc(net, node, undefReturn=0.0)¶
The local clustering coefficient of a node in monoplex network.
- Parameters:
- netMultilayerNetwork with aspects=0
The input network.
- nodeany object
The focal node. Given as the node index in the network.
- undefReturnany object
Value of this parameter is returned if the clustering coefficient is not defined.
- Returns:
- float or object
The clustering coefficient value, or the undefReturn value if the clustering coefficient is not defined for the node.
Notes
Time complexity O(k^2), where k is the degree of the node. This could be improved if it is known that the neighbors degrees are smaller than the nodes degrees to O(k*kn), where kn is the average degree of all the neighbors.
The function assumes that the network doesn’t have any self-links, and that it’s undirected.