graphstat.rst 1.0 KB

12345678910111213141516171819202122232425
  1. :mod:`altgraph.GraphStat` --- Functions providing various graph statistics
  2. ==========================================================================
  3. .. module:: altgraph.GraphStat
  4. :synopsis: Functions providing various graph statistics
  5. The module :mod:`altgraph.GraphStat` provides function that calculate
  6. graph statistics. Currently there is only one such function, more may
  7. be added later.
  8. .. function:: degree_dist(graph[, limits[, bin_num[, mode]]])
  9. Groups the number of edges per node into *bin_num* bins
  10. and returns the list of those bins. Every item in the result
  11. is a tuple with the center of the bin and the number of items
  12. in that bin.
  13. When the *limits* argument is present it must be a tuple with
  14. the mininum and maximum number of edges that get binned (that
  15. is, when *limits* is ``(4, 10)`` only nodes with between 4
  16. and 10 edges get counted.
  17. The *mode* argument is used to count incoming (``'inc'``) or
  18. outgoing (``'out'``) edges. The default is to count the outgoing
  19. edges.