fnss.topologies.topology.od_pairs_from_topology — FNSS 0.1.0 documentation

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.1.0 documentation »
- API Reference »
- Functions »

# fnss.topologies.topology.od_pairs_from_topology

`od_pairs_from_topology`(topology)

  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 The topology should be directed. If not, this function will convert the graph to a directed one and calculate pairs on this graph.
  Returns : | od_pair : list List containing all origin destination tuples. Value of the maximum flow, i.e., net outflow from the source.

  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)]

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- FNSS 0.1.0 documentation »
- API Reference »
- Functions »