Hypergraph class.
Hypergraphs are a generalization of graphs where an edge (called
hyperedge) can connect more than two nodes.
|
|
number
|
__len__(self)
Return the size of the hypergraph when requested by len(). |
|
|
string
|
__str__(self)
Return a string representing the hypergraph when requested by str()
(or print). |
|
|
|
add_hyperedge(self,
hyperedge)
Add given hyperedge to the hypergraph. |
|
|
|
add_hyperedges(self,
edgelist)
Add given hyperedges to the hypergraph. |
|
|
|
add_node(self,
node)
Add given node to the hypergraph. |
|
|
|
add_nodes(self,
nodelist)
Add given nodes to the hypergraph. |
|
|
boolean
|
has_node(self,
node)
Return whether the requested node exists. |
|
|
list
|
|
|
link(self,
node,
hyperedge)
Link given node and hyperedge. |
|
|
list
|
links(self,
obj)
Return all objects linked to the given one. |
|
|
list
|
nodes(self)
Return node list. |
|
|
|
unlink(self,
node,
hyperedge)
Unlink given node and hyperedge. |
|
|
|
read(self,
string,
fmt=' xml ' )
Read a hypergraph from a string. |
|
|
string
|
write(self,
fmt=' xml ' )
Write the hypergraph to a string. |
|
|
dictionary
|
|
dictionary
|
|
list
|
cut_hyperedges(self)
Return the cut-hyperedges of the given hypergraph. |
|
|
list
|
cut_nodes(self)
Return the cut-nodes of the given hypergraph. |
|
|
int
|
rank(self)
Return the rank of the given hypergraph. |
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|