hatvis.core.DirectedHypergraph#
- class hatvis.core.DirectedHypergraph(arcs, *, nodes=None, weights=None, edge_labels=None, name=None, edge_data=None)[source]#
Bases:
objectDirected hypergraph: every hyperarc \(e=(T(e),\,H(e))\) has a tail and a head set.
Directed hypergraphs (Gallo et al. 1993) model AND-type dependencies: reactions, Horn clauses, assembly steps or association rules \(X\Rightarrow Y\).
- Parameters:
- arcsiterable
of(tail,head)pairsormappinglabel -> (tail, head) - nodes, weights, edge_labels, name
seeHypergraph. - >>> D = DirectedHypergraph([([“a”, “b”], [“c”]), ([“c”], [“d”, “e”])])
- >>> D.tails(), D.heads()
- ({‘e0’: (‘a’, ‘b’), ‘e1’: (‘c’,)}, {‘e0’: (‘c’,), ‘e1’: (‘d’, ‘e’)})
- arcsiterable