aryagraph.generators.classic.hypercube_graph#
- aryagraph.generators.classic.hypercube_graph(d: int, *, directed: bool = False) Graph[source]#
d-dimensional hypercubeQ_d: nodes0 … 2^d - 1, edges between labels differing in one bit.Each node carries
bits, its label as ad-character binary string (networkx uses tuples of bits as the node labels instead). Directed arcs set a bit (i → i | 2^k), which makes the Boolean lattice, a DAG.