File: graphstat.rst

package info (click to toggle)
mozjs52 52.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 250,248 kB
  • sloc: cpp: 818,254; ansic: 278,823; python: 205,544; sh: 27,794; asm: 13,536; makefile: 10,661; perl: 7,438; xml: 2,812; java: 1,421; exp: 499; lisp: 258; objc: 234; csh: 17; sed: 17
file content (25 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
:mod:`altgraph.GraphStat` --- Functions providing various graph statistics
==========================================================================

.. module:: altgraph.GraphStat
   :synopsis: Functions providing various graph statistics

The module :mod:`altgraph.GraphStat` provides function that calculate
graph statistics. Currently there is only one such function, more may
be added later.

.. function:: degree_dist(graph[, limits[, bin_num[, mode]]])

   Groups the number of edges per node into *bin_num* bins
   and returns the list of those bins. Every item in the result
   is a tuple with the center of the bin and the number of items
   in that bin.

   When the *limits* argument is present it must be a tuple with
   the mininum and maximum number of edges that get binned (that
   is, when *limits* is ``(4, 10)`` only nodes with between 4
   and 10 edges get counted.

   The *mode* argument is used to count incoming (``'inc'``) or
   outgoing (``'out'``) edges. The default is to count the outgoing
   edges.