Skip to main content

simplify_weighted

Function simplify_weighted 

Source
pub fn simplify_weighted(
    algorithm: Simplify,
    points: &[(f64, f64)],
    weights: &[f64],
) -> Vec<(f64, f64)>
Expand description

simplify() with per-vertex tolerance multipliers: the effective parameter at points[i] is param * weights[i] (for Visvalingam, min_area * weights[i]²). Callers pass one strictly positive weight per point; all-ones weights reproduce simplify().

§Panics

Panics if points.len() != weights.len().