python-igraph API reference

List of all classes, functions and methods in python-igraph

module documentation

Undocumented

Function _degree​_distribution Calculates the degree distribution of the graph.
Function _indegree Returns the in-degrees in a list.
Function _outdegree Returns the out-degrees in a list.
Function _pagerank Calculates the PageRank values of a graph.
def _degree_distribution(graph, bin_width=1, *args, **kwds):

Calculates the degree distribution of the graph.

Unknown keyword arguments are directly passed to GraphBase.degree.

Parameters
graphUndocumented
bin​_widththe bin width of the histogram
*argsUndocumented
**kwdsUndocumented
Returns
a histogram representing the degree distribution of the graph.
def _indegree(graph, *args, **kwds):

Returns the in-degrees in a list.

See GraphBase.degree for possible arguments.

def _outdegree(graph, *args, **kwds):

Returns the out-degrees in a list.

See GraphBase.degree for possible arguments.

def _pagerank(graph, vertices=None, directed=True, damping=0.85, weights=None, arpack_options=None, implementation='prpack', niter=1000, eps=0.001):
Calculates the PageRank values of a graph.
Parameters
graphUndocumented
verticesthe indices of the vertices being queried. None means all of the vertices.
directedwhether to consider directed paths.
dampingthe damping factor. 1 − damping is the PageRank value for nodes with no incoming links. It is also the probability of resetting the random walk to a uniform distribution in each step.
weightsedge weights to be used. Can be a sequence or iterable or even an edge attribute name.
arpack​_optionsan ARPACKOptions object used to fine-tune the ARPACK eigenvector calculation. If omitted, the module-level variable called arpack_options is used. This argument is ignored if not the ARPACK implementation is used, see the implementation argument.
implementation

which implementation to use to solve the PageRank eigenproblem. Possible values are:

  • "prpack": use the PRPACK library. This is a new implementation in igraph 0.7
  • "arpack": use the ARPACK library. This implementation was used from version 0.5, until version 0.7.
  • "power": use a simple power method. This is the implementation that was used before igraph version 0.5.
niterThe number of iterations to use in the power method implementation. It is ignored in the other implementations
epsThe power method implementation will consider the calculation as complete if the difference of PageRank values between iterations change less than this value for every node. It is ignored by the other implementations.
Returns
a list with the Google PageRank values of the specified vertices.