Hypergraph#

class discopy.para.Hypergraph(dom, cod, inside, param=None, copar=None)[source]#

Bases: Compact, Markov, discopy.abc.HypergraphCategory

Parametric maps over a hypergraph underlying category form a hypergraph category, with the spiders of the underlying category.

Parameters:
  • dom (ob)

  • cod (ob)

  • inside (category)

  • param (ob)

  • copar (ob)

category#

alias of Diagram

classmethod spiders(n_legs_in, n_legs_out, typ)[source]#

The spiders of the underlying category, with empty parameters.

Parameters:
  • n_legs_in (int) – The number of legs in for each spider.

  • n_legs_out (int) – The number of legs out for each spider.

  • typ (Ty) – The type of the spiders.

Return type:

Hypergraph