Method: NetworkX::Graph#get_node_data

Defined in:
lib/networkx/graph.rb

#get_node_data(node) ⇒ Object

Gets the node data

Examples:

graph.get_node_data(node)

Parameters:

  • node (Object)

    the node whose data is to be fetched

Raises:

  • (ArgumentError)


306
307
308
309
310
# File 'lib/networkx/graph.rb', line 306

def get_node_data(node)
  raise ArgumentError, 'No such node exists!' unless node?(node)

  @nodes[node]
end