Function triangular_lattice_graph
Source pub fn triangular_lattice_graph(
rows: usize,
cols: usize,
) -> Result<Graph<usize, f64>>
Expand description
Generates a triangular lattice graph
§Arguments
rows
- Number of rows
cols
- Number of columns
§Returns
Result<Graph<usize, f64>>
- A triangular lattice where each node has up to 6 neighbors