class GraphSummary:
Summary representation of a graph.
The summary representation includes a header line and the list of edges. The header line consists of IGRAPH, followed by a four-character long code, the number of vertices, the number of edges, two dashes (--) and the name of the graph (i.e. the contents of the name attribute, if any). For instance, a header line may look like this:
IGRAPH U--- 4 5 --
The four-character code describes some basic properties of the graph. The first character is U if the graph is undirected, D if it is directed. The second letter is N if the graph has a vertex attribute called name, or a dash otherwise. The third letter is W if the graph is weighted (i.e. it has an edge attribute called weight), or a dash otherwise. The fourth letter is B if the graph has a vertex attribute called type; this is usually used for bipartite graphs.
Edges may be presented as an ordinary edge list or an adjacency list. By default, this depends on the number of edges; however, you can control it with the appropriate constructor arguments.
__init__
Constructs a summary representation of a graph.
__str__
Returns the summary representation as a string.
edge_list_format
Undocumented
max_rows
Undocumented
print_edge_attributes
Undocumented
print_graph_attributes
Undocumented
print_vertex_attributes
Undocumented
verbosity
Undocumented
width
Undocumented
wrapper
Undocumented
_construct_edgelist_adjlist
Constructs the part in the summary that prints the edge list in an adjacency list format.
_construct_edgelist_compressed
Constructs the part in the summary that prints the edge list in a compressed format suitable for graphs with mostly small degrees.
_construct_edgelist_edgelist
Constructs the part in the summary that prints the edge list in a full edge list format.
_construct_graph_attributes
Constructs the part in the summary that lists the graph attributes.
_construct_header
Constructs the header part of the summary.
_construct_vertex_attributes
Constructs the part in the summary that lists the vertex attributes.
_edge_attribute_iterator
Returns an iterator that yields the rows of the edge attribute table in the summary. attribute_order must be a list containing the names of the attributes to be presented in this table.
_infer_column_alignment
Infers the preferred alignment for the given vertex and edge attributes in the tables by peeking into the attribute values of the first 100 vertices or edges. Numeric attributes will be aligned right, everything else will be aligned left.
_new_table
Constructs a new table to pretty-print vertex and edge attributes
_vertex_attribute_iterator
Returns an iterator that yields the rows of the vertex attribute table in the summary. attribute_order must be a list containing the names of the attributes to be presented in this table.
_arrow
Undocumented
_arrow_format
Undocumented
_edges_header
Undocumented
_graph
Undocumented
Constructs a summary representation of a graph.
Returns the summary representation as a string.
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Undocumented
Constructs the part in the summary that prints the edge list in an adjacency list format.
Constructs the part in the summary that prints the edge list in a compressed format suitable for graphs with mostly small degrees.
Constructs the part in the summary that prints the edge list in a full edge list format.
Constructs the part in the summary that lists the graph attributes.
Constructs the header part of the summary.
Constructs the part in the summary that lists the vertex attributes.
Returns an iterator that yields the rows of the edge attribute table in the summary. attribute_order must be a list containing the names of the attributes to be presented in this table.
Infers the preferred alignment for the given vertex and edge attributes in the tables by peeking into the attribute values of the first 100 vertices or edges. Numeric attributes will be aligned right, everything else will be aligned left.
Constructs a new table to pretty-print vertex and edge attributes
Returns an iterator that yields the rows of the vertex attribute table in the summary. attribute_order must be a list containing the names of the attributes to be presented in this table.
Undocumented
Undocumented
Undocumented
Undocumented