fnss.topologies.topology.Topology.copy

Topology.copy()[source]

Return a copy of the topology.

Returns :

topology : Topology

A copy of the topology.

See also

to_directed
return a directed copy of the topology.

Notes

This makes a complete copy of the topology including all of the node or edge attributes.

Examples

>>> topo = Topology()
>>> topo.add_path([0,1,2,3])
>>> copied_topo = topo.copy()