Ideal valence
Valence deviation sum \[\sum{(valence(v_i) - ideal\_valence(v_i))^2}\]
Flip if it decreases valence deviation
Target length can be computed adaptively
Scale initial target_length_ by \(k_{max}\) \[k_{max} = H + \sqrt{H^2 - K}\]
Apply several iterations of uniform smoothing on target_length_
Rescale target length such that its mean over all the vertices is equal to user-specified value
check if edge is deleted
check if halfedge collapsible
check if edge is flippable