xgi.generators.lattice
Generators for some lattice hypergraphs.
All the functions in this module return a Hypergraph class (i.e. a simple, undirected hypergraph).
Functions
- xgi.generators.lattice.ring_lattice(n, d, k, l)[source]
A ring lattice hypergraph.
A d-uniform hypergraph on n nodes where each node is part of k edges and the overlap between consecutive edges is d-l.
- Parameters:
n (int) – Number of nodes
d (int) – Edge size
k (int) – Number of edges of which a node is a part. Should be a multiple of 2.
l (int) – Overlap between edges
- Returns:
The generated hypergraph
- Return type:
- Raises:
XGIError – If k is negative.
Notes
ring_lattice(n, 2, k, 0) is a ring lattice graph where each node has k//2 edges on either side.