igraph library.
Package | app |
User interfaces of igraph |
Module | clustering |
Classes related to graph clustering. |
Module | configuration |
Configuration framework for igraph. |
Module | cut |
Classes representing cuts and flows on graphs. |
Module | datatypes |
Additional auxiliary data types |
Package | drawing |
Drawing and plotting routines for igraph. |
Module | formula |
Implementation of igraph.Graph.Formula() . |
Module | layout |
Layout-related code in the igraph library. |
Module | matching |
Classes representing matchings on graphs. |
Module | operators |
Implementation of union, disjoint union and intersection operators. |
Package | remote |
Classes that help igraph communicate with remote applications. |
Module | sparse |
Implementation of Python-level sparse matrix operations. |
Module | statistics |
Statistics related stuff in igraph |
Module | summary |
Summary representation of a graph. |
Module | utils |
Utility functions that cannot be categorised anywhere else. |
Module | version |
Undocumented |
Module | _igraph |
Low-level Python interface for the igraph library. Should not be used directly. |
From __init__.py
:
Class |
|
Class representing a sequence of edges in the graph. |
Class |
|
Generic graph. |
Class |
|
Class representing a sequence of vertices in the graph. |
Function | autocurve |
Calculates curvature values for each of the edges in the graph to make sure that multiple edges are shown properly on a graph plot. |
Function | deprecated |
Prints a warning message related to the deprecation of some igraph feature. |
Function | get |
Returns the folder that contains the C API headers of the Python interface of igraph. |
Function | read |
Loads a graph from the given filename. |
Function | write |
Saves a graph to the given file. |
Variable | __license__ |
Undocumented |
Variable | config |
The main configuration object of igraph. Use this object to modify igraph's behaviour, typically when used in interactive mode. |
Function | _3d |
Creates an alias for the 3D version of the given layout algoritm. |
Function | _add |
Undocumented |
Function | _graphmethod |
Auxiliary decorator |
Function | _layout |
Wraps an existing layout method to ensure that it returns a Layout instead of a list of lists. |
Auxiliary decorator
This decorator allows some methods of VertexSeq
and EdgeSeq
to call their respective counterparts in Graph
to avoid code duplication.
Parameters | |
func | the function being decorated. This function will be called on the results of the original Graph method. If None, defaults to the identity function. |
name | the name of the corresponding method in Graph . If None, it defaults to the name of the decorated function. |
Returns | |
the decorated function |
Wraps an existing layout method to ensure that it returns a Layout instead of a list of lists.
Parameters | |
func | the method to wrap. Must be a method of the Graph object. |
Returns | |
a new method |
Creates an alias for the 3D version of the given layout algoritm.
This function is a decorator that creates a method which calls func after attaching dim=3 to the list of keyword arguments.
Parameters | |
func | must be a method of the Graph object. |
Returns | |
a new method |
Calculates curvature values for each of the edges in the graph to make sure that multiple edges are shown properly on a graph plot.
This function checks the multiplicity of each edge in the graph and assigns curvature values (numbers between -1 and 1, corresponding to CCW (-1), straight (0) and CW (1) curved edges) to them. The assigned values are either stored in an edge attribute or returned as a list, depending on the value of the attribute argument.
Parameters | |
graph | the graph on which the calculation will be run |
attribute | the name of the edge attribute to save the curvature values to. The default value is curved, which is the name of the edge attribute the default graph plotter checks to decide whether an edge should be curved on the plot or not. If attribute is None, the result will not be stored. |
default | the default curvature for single edges. Zero means that single edges will be straight. If you want single edges to be curved as well, try passing 0.5 or -0.5 here. |
Returns | |
the list of curvature values if attribute is None, otherwise None. |
Loads a graph from the given filename.
This is just a convenience function, calls Graph.Read
directly. All arguments are passed unchanged to Graph.Read
Parameters | |
filename | the name of the file to be loaded |
*args | Undocumented |
**kwds | Undocumented |
Saves a graph to the given file.
This is just a convenience function, calls Graph.write
directly. All arguments are passed unchanged to Graph.write
Parameters | |
graph | the graph to be saved |
filename | the name of the file to be written |
*args | Undocumented |
**kwds | Undocumented |
The main configuration object of igraph. Use this object to modify igraph's behaviour, typically when used in interactive mode.