/**
 * Sorted Heavy-Edge Matching.
 *
 * Visits vertices in random order biased toward lower degree first, and for
 * each unmatched vertex pairs it with the unmatched neighbour sharing the
 * heaviest edge weight (subject to a coarse-vertex weight cap).
 *
 * Outputs:
 *  - `graph.coarse_vertex_map[v]` = id of the coarse vertex that vertex v
 *    collapses into. Numbered so that iterating v=0..vertex_count walks coarse
 *    ids 0..coarse_vertex_count-1 in order — this property is required by
 *    `create_coarse_graph`.
 *  - `partner_of_vertex[v]` = the partner of vertex v (or v itself if it ended
 *    up alone in the matching). Caller-provided buffer, filled in place.
 *  - returns `coarse_vertex_count`, the number of coarse vertices created.
 *
 * Mirrors `Match_SHEM` from libmetis/coarsen.c, single-constraint branch.
 * The 2-hop matching escape hatch is intentionally skipped — it's a degeneracy
 * recovery for graphs with many isolated/low-degree vertices that's not on the
 * critical path; can add later if cluster quality bites.
 *
 * @param {import('../MetisGraph.js').MetisGraph} graph
 * @param {function():number} random seeded RNG
 * @param {number} max_coarse_vertex_weight cap on the combined weight of a
 *   matched pair; vertices whose own weight already exceeds this are forced
 *   into singleton coarse vertices
 * @param {Uint32Array} partner_of_vertex caller-provided buffer of length
 *   `>= graph.vertex_count`. Will be filled with each vertex's match partner
 *   (or its own id if it ended up unmatched). The first `graph.vertex_count`
 *   entries are clobbered; any tail beyond that is left untouched.
 * @param {Uint32Array} visit_order caller-provided scratch of length
 *   `>= graph.vertex_count`. Used as the (random-shuffled, degree-sorted)
 *   visitation order during matching. Contents on entry are ignored;
 *   contents on return are undefined.
 * @param {Uint32Array} sort_key_degree caller-provided scratch of length
 *   `>= graph.vertex_count`. Holds the per-vertex degree buckets used to sort
 *   `visit_order`. Contents on entry are ignored; contents on return are undefined.
 * @returns {number} `coarse_vertex_count`
 */
export function match_shem(graph: import('../MetisGraph.js').MetisGraph, random: () => number, max_coarse_vertex_weight: number, partner_of_vertex: Uint32Array, visit_order: Uint32Array, sort_key_degree: Uint32Array): number;
//# sourceMappingURL=match_shem.d.ts.map