dynetx.classes.function.add_star

dynetx.classes.function.add_star(G, nodes, t, **attr)

Add a star at time t.

The first node in nodes is the middle of the star. It is connected to all other nodes.

Parameters:
  • G (graph) – A DyNetx graph
  • nodes (iterable container) – A container of nodes.
  • t (snapshot id (default=None)) – snapshot id

Examples

>>> G = dn.DynGraph()
>>> dn.add_star(G, [0,1,2,3], t=0)