xgi.stats.edgestat_func

xgi.stats.edgestat_func(func)[source]

Decorate arbitrary functions to behave like EdgeStat objects.

Works identically to nodestat(). For extended documentation, see nodestat_func().

Parameters:

func (callable) – Function or callable with signature func(net, bunch), where net is the network and bunch is an iterable of edges in net. The call func(net, bunch) must return a dict with pairs of the form (edge: value) where edge is in bunch and value is the value of the statistic at edge.

Returns:

The decorated callable unmodified, after registering it in the stats framework.

Return type:

callable

See also

nodestat_func()