dynetx.DynDiGraph.__init__¶
- DynDiGraph.__init__(data=None, edge_removal=True, **attr)¶
Initialize a directed graph with interaction, name, graph attributes.
Parameters¶
- datainput graph
Data to initialize graph. If data=None (default) an empty graph is created. The data can be an interaction list, or any NetworkX/DyNetx graph object. If the corresponding optional Python packages are installed the data can also be a NumPy matrix or 2d ndarray, a SciPy sparse matrix, or a PyGraphviz graph.
- edge_removalbool, optional (default=True)
Specify if the dynamic graph instance should allows edge removal or not.
- attrkeyword arguments, optional (default= no attributes)
Attributes to add to graph as key=value pairs.
Examples¶
>>> import dynetx as dn >>> G = dn.DynDiGraph() >>> H = dn.DynDiGraph(edge_removal=True)