python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Module summary' :: Class GraphSummary
[hide private]

Class GraphSummary

source code

object --+
         |
        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.

Instance Methods [hide private]
 
__init__(self, graph, verbosity=0, width=78, edge_list_format='auto', max_rows=99999, print_graph_attributes=False, print_vertex_attributes=False, print_edge_attributes=False, full=False)
Constructs a summary representation of a graph.
source code
 
__str__(self)
Returns the summary representation as a string.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, graph, verbosity=0, width=78, edge_list_format='auto', max_rows=99999, print_graph_attributes=False, print_vertex_attributes=False, print_edge_attributes=False, full=False)
(Constructor)

source code 

Constructs a summary representation of a graph.

Parameters:
  • verbosity - the verbosity of the summary. If zero, only the header line will be returned. If one, the header line and the list of edges will both be returned.
  • width - the maximal width of each line in the summary. None means that no limit will be enforced.
  • max_rows - the maximal number of rows to print in a single table (e.g., vertex attribute table or edge attribute table)
  • edge_list_format - format of the edge list in the summary. Supported formats are: compressed, adjlist, edgelist, auto, which selects automatically from the other three based on some simple criteria.
  • print_graph_attributes - whether to print graph attributes if there are any.
  • print_vertex_attributes - whether to print vertex attributes if there are any.
  • print_edge_attributes - whether to print edge attributes if there are any.
  • full - False has no effect; True turns on the attribute printing for graph, vertex and edge attributes with verbosity 1.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

Returns the summary representation as a string.

Overrides: object.__str__

   Home       Trees       Indices       Help