/**
 * Driver: improve the shape quality of an existing tetrahedral mesh by
 * locally smoothing low-quality tets and applying 2-3 / 3-2 flips that
 * monotonically increase the per-tet minimum quality.
 *
 * Algorithm — one pass:
 *   1. Scan every live tet, compute its radius-ratio quality.
 *   2. For each tet below `target_quality`, try in order:
 *      a. Laplacian smoothing on each non-boundary vertex. Accept the
 *         move only if the worst-of-the-1-ring quality strictly improves;
 *         otherwise revert the position.
 *      b. 2-3 flip across each of the tet's 4 internal faces. Tentatively
 *         apply the flip, score the 3 new tets; accept only if the
 *         minimum-of-three exceeds the original min-of-two. Otherwise
 *         apply the inverse 3-2 flip to roll back.
 *   3. Repeat until no operation in a pass improves anything, or
 *      `max_passes` is reached.
 *
 * The "do then maybe undo" pattern for flips keeps the driver simple: no
 * separate "preview the flip" code path. The cost is a wasted reverse-flip
 * per rejected candidate. In practice most candidate flips on bad tets are
 * either clearly beneficial (accepted) or clearly bad (rejected after one
 * round-trip), so the overhead is small.
 *
 * Mesh topology and points are mutated in place. Surface vertices (any
 * vertex incident to a face with INVALID_NEIGHBOUR) are NEVER moved by
 * smoothing — moving them would change the surface shape, which is
 * usually a hard constraint for the caller.
 *
 * @param {TetrahedralMesh} mesh — mutated in place
 * @param {Float32Array|number[]} points — flat (x,y,z) positions, mutated
 * @param {{
 *   target_quality?: number,
 *   max_passes?: number,
 *   smoothing_weight?: number,
 *   enable_flips?: boolean,
 *   enable_smoothing?: boolean,
 * }} [options]
 * @returns {{
 *   passes_run: number,
 *   smoothings_committed: number,
 *   smoothings_reverted: number,
 *   flips_23_committed: number,
 *   flips_23_rejected: number,
 *   flips_32_committed: number,
 *   flips_32_rejected: number,
 *   initial_min_quality: number,
 *   final_min_quality: number,
 * }}
 */
export function tetrahedral_mesh_improve_quality(mesh: TetrahedralMesh, points: Float32Array | number[], options?: {
    target_quality?: number;
    max_passes?: number;
    smoothing_weight?: number;
    enable_flips?: boolean;
    enable_smoothing?: boolean;
}): {
    passes_run: number;
    smoothings_committed: number;
    smoothings_reverted: number;
    flips_23_committed: number;
    flips_23_rejected: number;
    flips_32_committed: number;
    flips_32_rejected: number;
    initial_min_quality: number;
    final_min_quality: number;
};
//# sourceMappingURL=tetrahedral_mesh_improve_quality.d.ts.map