Utility class to track nodes and edges - replaces networkx.MultiGraph.
More...
|
def | __init__ (self) |
|
def | add_node (self, node, attr_dict=None, **attrs) |
| Add node to graph. More...
|
|
def | add_edge (self, src, dst, key=None, attr_dict=None, **attrs) |
| Add edge to graph. More...
|
|
def | nodes (self, data=False) |
| Return list of graph nodes. More...
|
|
def | edges_iter (self, data=False, keys=False) |
| Iterator: return graph edges, optionally with data and keys.
|
|
def | edges (self, data=False, keys=False) |
| Return list of graph edges.
|
|
def | __getitem__ (self, node) |
| Return link dict for given src node.
|
|
def | __len__ (self) |
| Return the number of nodes.
|
|
def | convertTo (self, cls, data=False, keys=False) |
| Convert to a new object of networkx.MultiGraph-like class cls. More...
|
|
Utility class to track nodes and edges - replaces networkx.MultiGraph.
◆ add_edge()
def mininet.topo.MultiGraph.add_edge |
( |
|
self, |
|
|
|
src, |
|
|
|
dst, |
|
|
|
key = None , |
|
|
|
attr_dict = None , |
|
|
** |
attrs |
|
) |
| |
Add edge to graph.
- Parameters
-
key | optional key |
attr_dict | optional attribute dict |
attrs | more attributes |
warning | updates attr_dict with attrs |
◆ add_node()
def mininet.topo.MultiGraph.add_node |
( |
|
self, |
|
|
|
node, |
|
|
|
attr_dict = None , |
|
|
** |
attrs |
|
) |
| |
Add node to graph.
- Parameters
-
attr_dict | attribute dict (optional) |
attrs | more attributes (optional) |
warning | updates attr_dict with attrs |
◆ convertTo()
def mininet.topo.MultiGraph.convertTo |
( |
|
self, |
|
|
|
cls, |
|
|
|
data = False , |
|
|
|
keys = False |
|
) |
| |
Convert to a new object of networkx.MultiGraph-like class cls.
- Parameters
-
data | include node and edge data |
keys | include edge keys as well as edge data |
◆ nodes()
def mininet.topo.MultiGraph.nodes |
( |
|
self, |
|
|
|
data = False |
|
) |
| |
Return list of graph nodes.
- Parameters
-
data | return list of ( node, attrs) |
The documentation for this class was generated from the following file: