hatvis.core.TemporalHypergraph#

class hatvis.core.TemporalHypergraph(edges=None, times=None, **kwargs)[source]#

Bases: Hypergraph

Hypergraph whose hyperedges carry a time stamp (or any ordered group label).

Parameters:
edgeslist of iterables

Hyperedges (repeated vertex sets at different times are separate hyperedges).

timessequence

One time stamp per hyperedge (numbers, dates or ordered labels).

**kwargspassed to Hypergraph.
>>> T = TemporalHypergraph([[“a”, “b”], [“a”, “b”, “c”], [“c”, “d”]], times=[1, 1, 2])
>>> [h.n_edges for h in T.snapshots().values()]
[2, 1]
aggregate(how='sum')[source]#

Static hypergraph: repeated vertex sets merged, weights aggregated over time.

at(t)[source]#

Snapshot of the hyperedges stamped t (all vertices kept).

snapshots()[source]#

Ordered mapping time -> snapshot.

property times#

Sorted distinct time stamps.

window(start, stop)[source]#

Hyperedges with start <= time < stop.