Skip to main content

Module triangular

Module triangular 

Source
Expand description

Triangular lattice mapping module.

Maps arbitrary graphs to weighted triangular lattice graphs.

§Example

use problemreductions::rules::unitdiskmapping::triangular;

let edges = vec![(0, 1), (1, 2), (0, 2)];
let result = triangular::map_weighted(3, &edges).unwrap();

Re-exports§

pub use gadgets::apply_crossing_gadgets;
pub use gadgets::apply_simplifier_gadgets;
pub use gadgets::tape_entry_mis_overhead;
pub use gadgets::SourceCell;
pub use gadgets::WeightedTriBranch;
pub use gadgets::WeightedTriBranchFix;
pub use gadgets::WeightedTriBranchFixB;
pub use gadgets::WeightedTriCross;
pub use gadgets::WeightedTriEndTurn;
pub use gadgets::WeightedTriTConDown;
pub use gadgets::WeightedTriTConLeft;
pub use gadgets::WeightedTriTConUp;
pub use gadgets::WeightedTriTapeEntry;
pub use gadgets::WeightedTriTrivialTurnLeft;
pub use gadgets::WeightedTriTrivialTurnRight;
pub use gadgets::WeightedTriTurn;
pub use gadgets::WeightedTriWTurn;
pub use gadgets::WeightedTriangularGadget;
pub use mapping::map_config_back;
pub use mapping::map_unit_weights;
pub use mapping::map_weighted;
pub use mapping::map_weighted_with_method;
pub use mapping::map_weighted_with_order;

Modules§

gadgets
Weighted triangular lattice gadgets with WeightedTri prefix.
mapping
Mapping functions for weighted triangular lattice.

Constants§

PADDING
Padding around the grid for triangular mapping.
SPACING
Spacing between copy lines for triangular mapping.

Functions§

map_weights
Add source weights in [0, 1] to the corresponding mapped center nodes.
trace_centers
Trace each original vertex center through the recorded gadget transformations.