Skip to main content

Module unitdiskmapping

Module unitdiskmapping 

Source
Expand description

Graph to grid graph mapping.

This module implements reductions from arbitrary graphs to unit disk grid graphs using the copy-line technique from UnitDiskMapping.jl.

§Modules

  • ksg: King’s Subgraph (8-connected square grid) mapping
  • triangular: Triangular lattice mapping

§Example

use problemreductions::rules::unitdiskmapping::{ksg, triangular};

let edges = vec![(0, 1), (1, 2), (0, 2)];

// Map to King's Subgraph (unweighted)
let result = ksg::map_unweighted(3, &edges);

// Map to King's Subgraph (weighted)
let weighted_result = ksg::map_weighted(3, &edges);

// Map to triangular lattice (weighted)
let tri_result = triangular::map_weighted(3, &edges);

Re-exports§

pub use ksg::GridKind;
pub use ksg::MappingResult;

Modules§

ksg
King’s Subgraph (KSG) mapping module.
triangular
Triangular lattice mapping module.