question: private void algorithmDouglasPeucker ( List < Entry > entries , double epsilon , int start , int end ) { if ( end <= start + 1 ) { return ; } int maxDistIndex = 0 ; double distMax = 0 ; Entry firstEntry = entries . get ( start ) ; Entry lastEntry = entries . get ( end ) ; for ( int i = start + 1 ; i < end ; i ++ ) { double dist = calcAngleBetweenLines ( firstEntry , lastEntry , firstEntry , entries . get ( i ) ) ; if ( dist > distMax ) { distMax = dist ; maxDistIndex = i ; } } if ( distMax > epsilon ) { keep [ maxDistIndex ] = true ; algorithmDouglasPeucker ( entries , epsilon , start , maxDistIndex ) ; algorithmDouglasPeucker ( entries , epsilon , maxDistIndex , end ) ; } }
target:  apply the Douglas-Peucker-Reduction to an List of Entry with a given epsilon (tolerance)