original_docstring: 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.
      
docstring: 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
  
  If G is undirected.
  
  See Also
  
  
  
  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.
docstring_tokens: 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 If G is undirected . See Also 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 .
code: def out_degree_centrality(G):
      """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.
      """
      if len(G) <= 1:
          return {n: 1 for n in G}
  
      s = 1.0 / (len(G) - 1.0)
      centrality = {n: d * s for n, d in G.out_degree()}
      return centrality
code_tokens: def out_degree_centrality ( G ) : if len ( G ) <= 1 : return { n : 1 for n in G } s = 1.0 / ( len ( G ) - 1.0 ) centrality = { n : d * s for n , d in G . out_degree ( ) } return centrality
short_docstring: Compute the out-degree centrality for nodes.
short_docstring_tokens: Compute the out - degree centrality for nodes .
comment: """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.
      """