Burt’s metric - Constraint.
:param G:
:type G: easygraph.Graph
:param nodes: The nodes you want to calculate. If None, all nodes in G will be calculated.
:type nodes: list of nodes or None, optional (default : None)
:param weight: The key for edge weight. If None, G will be regarded as unweighted graph.
:type weight: string or None, optional (default : None)
:param workers: The number of workers calculating (default: None).
None if not using only one worker.
Returns:
constraint – The Constraint of node in nodes.
Return type:
dict
Examples
>>> constraint(G,... nodes=[1,2,3],# Compute the Constraint of some nodes. The default is None for all nodes in G.... weight='weight',# The weight key of the graph. The default is None for unweighted graph.... n_workers=4# Parallel computing on four workers. The default is None for serial computing.... )
Burt’s metric - Effective Size.
:param G:
:type G: easygraph.Graph or easygraph.DiGraph
:param nodes: The nodes you want to calculate. If None, all nodes in G will be calculated.
:type nodes: list of nodes or None, optional (default : None)
:param weight: The key for edge weight. If None, G will be regarded as unweighted graph.
:type weight: string or None, optional (default : None)
Returns:
effective_size – The Effective Size of node in nodes.
Return type:
dict
Examples
>>> effective_size(G,... nodes=[1,2,3],# Compute the Effective Size of some nodes. The default is None for all nodes in G.... weight='weight'# The weight key of the graph. The default is None for unweighted graph.... )
Burt’s metric - Efficiency.
:param G:
:type G: easygraph.Graph
:param nodes: The nodes you want to calculate. If None, all nodes in G will be calculated.
:type nodes: list of nodes or None, optional (default : None)
:param weight: The key for edge weight. If None, G will be regarded as unweighted graph.
:type weight: string or None, optional (default : None)
Returns:
efficiency – The Efficiency of node in nodes.
Return type:
dict
Examples
>>> efficiency(G,... nodes=[1,2,3],# Compute the Efficiency of some nodes. The default is None for all nodes in G.... weight='weight'# The weight key of the graph. The default is None for unweighted graph.... )