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

Ggraph

A DyNetx graph

nodesiterable container

A container of nodes.

tsnapshot id (default=None)

snapshot id

See Also

add_path, add_cycle

Examples

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