map_weighted_with_order

Function map_weighted_with_order 

Source
pub fn map_weighted_with_order(
    num_vertices: usize,
    edges: &[(usize, usize)],
    vertex_order: &[usize],
) -> MappingResult
Expand description

Map a graph to weighted triangular lattice with specific vertex ordering.

This is the most flexible mapping function, allowing custom vertex ordering for cases where a specific layout is desired.

§Arguments

  • num_vertices - Number of vertices in the original graph
  • edges - Edge list as (u, v) pairs
  • vertex_order - Custom vertex ordering

§Returns

A MappingResult containing the grid graph and mapping metadata.

§Panics

Panics if num_vertices == 0 or if any edge vertex is not in vertex_order.