Standard methods common to all graph classes.
boolean
|
__eq__(self,
other)
Return whether this graph is equal to another one. |
|
|
iterator
|
__getitem__(self,
node)
Return a iterator passing through all neighbors of the given node. |
|
|
iterator
|
__iter__(self)
Return a iterator passing through all nodes in the graph. |
|
|
number
|
__len__(self)
Return the order of self when requested by len(). |
|
|
string
|
__repr__(self)
Return a string representing the graph when requested by repr() |
|
|
string
|
__str__(self)
Return a string representing the graph when requested by str() (or
print). |
|
|
|
add_graph(self,
other)
Add other graph to this graph. |
|
|
|
add_nodes(self,
nodelist)
Add given nodes to the graph. |
|
|
|
|
|
complete(self)
Make the graph a complete graph. |
|
|
graph
|
inverse(self)
Return the inverse of the graph. |
|
|
number
|
order(self)
Return the order of self, this is defined as the number of nodes in
the graph. |
|
|
digraph
|
reverse(self)
Generate the reverse of a directed graph, returns an identical graph
if not directed. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__init__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|