fnss.topologies.topology.DirectedTopology.adjacency_list — FNSS 0.7.0 documentation

# fnss.topologies.topology.DirectedTopology.adjacency_list

`DirectedTopology.` `adjacency_list`()

  Return an adjacency list representation of the graph.

  The output adjacency list is in the order of G.nodes(). For directed graphs, only outgoing adjacencies are included.

  Returns: | adj_list : lists of lists The adjacency structure of the graph as a list of lists.

  See also

  `adjacency_iter`

  Examples

      >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc
      >>> G.add_path([0,1,2,3])
      >>> G.adjacency_list() # in order given by G.nodes()
      [[1], [0, 2], [1, 3], [2]]