Apply strong heuristics to speed up line generalization
remove debug output
unlinting DouglasPeucker
use lambda for complex initialization
rename one char variable names
remove variable name lint
further reduce lint
remove depth of nested block
safe-guard against broken input data
rename variable to a shorter name
add some comments to reduce NCSS complexity
use EdgeWeight typedef where possible