Calculate all possible origin-destination pairs of graph topology. It is different to calculate all possible nodes pairs in that this function excludes all pairs of nodes not connected by any path.
Parameters : | topology : Topology
|
---|---|
Returns : | od_pair : list
|
Examples
>>> import fnss
>>> topology = fnss.ring_topology(3)
>>> fnss.od_pairs_from_topology(topology)
[(0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1)]