/**
 * Drive the coarsening phase: repeatedly match + contract until the coarsest
 * graph is small enough, or the contraction ratio drops below the threshold.
 *
 * On entry, `graph` is the original finest graph. On return, the result is the
 * coarsest graph; walking `.finer_graph` repeatedly reaches the original.
 *
 * Mirrors `CoarsenGraph` from libmetis/coarsen.c.
 *
 * @param {import('../MetisGraph.js').MetisGraph} graph
 * @param {{random: function():number, coarsen_until_vertex_count: number}} opts
 *   `coarsen_until_vertex_count`: stop coarsening once vertex_count drops at or
 *   below this. METIS uses `max(vertex_count / (20·log2(nparts)), 30·nparts)`.
 * @returns {import('../MetisGraph.js').MetisGraph} the coarsest graph
 */
export function coarsen_graph(graph: import('../MetisGraph.js').MetisGraph, opts: {
    random: () => number;
    coarsen_until_vertex_count: number;
}): import('../MetisGraph.js').MetisGraph;
//# sourceMappingURL=coarsen_graph.d.ts.map