lib/networkx/graph.rb
# Retus a hash of neighbours of a node
#
# @example
#   graph.neighbours(node)
#
# @param node [Object] the node whose neighbours are to be fetched
Retus a hash of neighbours of a node
Retus a hash of neighbours of a node
def neighbours(node)
      raise KeyError, 'No such node exists!' unless node?(node)
      @adj[node]
    end
def neighbours ( node ) raise KeyError , 'No such node exists!' unless node? ( node ) @adj [ node ] end
Retus a hash of neighbours of a node
Retus a hash of neighbours of a node
node
the node whose neighbours are to be fetched
the node whose neighbours are to be fetched
example
None