ó žÃÒYc@shdZddlZddlmZdddgZd„Zedƒd „ƒZedƒd „ƒZdS( sDegree centrality measures.iÿÿÿÿN(tnot_implemented_fortdegree_centralitytin_degree_centralitytout_degree_centralitycs:i}dt|ƒd‰‡fd†|jƒDƒ}|S(sèCompute the degree centrality for nodes. The degree centrality for a node v is the fraction of nodes it is connected to. Parameters ---------- G : graph A networkx graph Returns ------- nodes : dictionary Dictionary of nodes with degree centrality as the value. See Also -------- betweenness_centrality, load_centrality, eigenvector_centrality Notes ----- The degree centrality values are normalized by dividing by the maximum possible degree in a simple graph n-1 where n is the number of nodes in G. For multigraphs or graphs with self loops the maximum degree might be higher than n-1 and values of degree centrality greater than 1 are possible. gð?cs#i|]\}}|ˆ|“qS(((t.0tntd(ts(s/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pys 3s (tlentdegree(tGt centrality((Rs/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pyRst undirectedcs:i}dt|ƒd‰‡fd†|jƒDƒ}|S(s:Compute the in-degree centrality for nodes. The in-degree centrality for a node v is the fraction of nodes its incoming edges are connected to. Parameters ---------- G : graph A NetworkX graph Returns ------- nodes : dictionary Dictionary of nodes with in-degree centrality as values. Raises ------ NetworkXNotImplemented: If G is undirected. See Also -------- degree_centrality, out_degree_centrality Notes ----- The degree centrality values are normalized by dividing by the maximum possible degree in a simple graph n-1 where n is the number of nodes in G. For multigraphs or graphs with self loops the maximum degree might be higher than n-1 and values of degree centrality greater than 1 are possible. gð?cs#i|]\}}|ˆ|“qS(((RRR(R(s/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pys \s (Rt in_degree(R R ((Rs/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pyR7s#cs:i}dt|ƒd‰‡fd†|jƒDƒ}|S(s<Compute the out-degree centrality for nodes. The out-degree centrality for a node v is the fraction of nodes its outgoing edges are connected to. Parameters ---------- G : graph A NetworkX graph Returns ------- nodes : dictionary Dictionary of nodes with out-degree centrality as values. Raises ------ NetworkXNotImplemented: If G is undirected. See Also -------- degree_centrality, in_degree_centrality Notes ----- The degree centrality values are normalized by dividing by the maximum possible degree in a simple graph n-1 where n is the number of nodes in G. For multigraphs or graphs with self loops the maximum degree might be higher than n-1 and values of degree centrality greater than 1 are possible. gð?cs#i|]\}}|ˆ|“qS(((RRR(R(s/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pys …s (Rt out_degree(R R ((Rs/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pyR`s#( t__doc__tnetworkxtnxtnetworkx.utils.decoratorsRt__all__RRR(((s/private/var/folders/w6/vb91730s7bb1k90y_rnhql1dhvdd44/T/pip-build-w4MwvS/networkx/networkx/algorithms/centrality/degree_alg.pyt s   #)