Skip to main content

netmaker

Function netmaker 

Source
pub fn netmaker(
    nodes: u32,
    out_min: u32,
    out_max: u32,
    locality: u32,
    seed: u64,
) -> BenchmarkGraph<3>
Expand description

A NetMaker graph (Section 4.3) over states 0..nodes with three objectives: a random directed Hamiltonian cycle whose edges get one cost from each of 1..=333, 334..=666 and 667..=1000 in random order, and per state a random extra out-degree from out_min + 1..=out_max (the cycle edge counts as one) filled with edges to states within the locality window [u - locality / 2, u + locality / 2] of its identifier, with costs uniform in 1..=99; no self-loops or duplicates. The paper uses nodes in {10000, 20000, 30000}, out_min = 1, out_max = 10 and locality in {20, 50}.

ยงPanics

Panics if nodes < 2 or out_min >= out_max.