modules.applications.optimization.mis.data.graph_layouts.generate_hexagonal_graph
- generate_hexagonal_graph(n_nodes: int, spacing: float, filling_fraction: float = 1.0) Graph
Generate a hexagonal graph layout based on the number of nodes and spacing.
- Parameters:
n_nodes -- The number of nodes in the graph
spacing -- The spacing between nodes (atoms)
filling_fraction -- The fraction of available places in the lattice to be filled with nodes. (default: 1.0)
- Returns:
Networkx Graph representing the hexagonal graph layout