List of all classes, functions and methods in python-igraph
||Converts the graph to networkx format.|
||Converts the graph from networkx|
||Converts the graph to graph-tool|
||Converts the graph from graph-tool|
Converts the graph to networkx format.
igraph has ordered vertices and edges, but networkx does not. To keep track of the original order, the '_igraph_index' vertex property is added to both vertices and edges.
|create_using||specifies which NetworkX graph class to use when constructing the graph. |
|vertex_attr_hashable (str)||vertex attribute used to name vertices in the exported network. The default "_nx_name" ensures round trip conversions to/from networkx are lossless.|
Converts the graph from networkx
Vertex names will be stored as a vertex_attr_hashable attribute (usually "_nx_name", but see below). Because python-igraph stored vertices in an ordered manner, vertices will get new ids from 0 up. In case of multigraphs, each edge will have an "_nx_multiedge_key" attribute, to distinguish edges that connect the same two vertices.
|Parameters||g||networkx Graph or DiGraph|
|vertex_attr_hashable (str)||attribute used to store the Python hashable used by networkx to identify each vertex. The default value '_nx_name' ensures lossless round trip conversions to/from networkx. An alternative choice is 'name': in that case, using strings for vertex names is recommended and, if the graph is re-exported to networkx, Graph.to_networkx(vertex_attr_hashable="name") must be used to recover the correct vertex nomenclature in the exported network.|
Converts the graph to graph-tool
Data types: graph-tool only accepts specific data types. See the following web page for a list:
Note: because of the restricted data types in graph-tool, vertex and edge attributes require to be type-consistent across all vertices or edges. If you set the property for only some vertices/edges, the other will be tagged as None in python-igraph, so they can only be converted to graph-tool with the type 'object' and any other conversion will fail.
|graph_attributes||dictionary of graph attributes to transfer. Keys are attributes from the graph, values are data types (see below). |
|vertex_attributes||dictionary of vertex attributes to transfer. Keys are attributes from the vertices, values are data types (see below). |
|edge_attributes||dictionary of edge attributes to transfer. Keys are attributes from the edges, values are data types (see below). |