question: private List < Entry > reduceWithDouglasPeuker ( List < Entry > entries , double epsilon ) { if ( epsilon <= 0 || entries . size ( ) < 3 ) { return entries ; } keep [ 0 ] = true ; keep [ entries . size ( ) - 1 ] = true ; algorithmDouglasPeucker ( entries , epsilon , 0 , entries . size ( ) - 1 ) ; List < Entry > reducedEntries = new ArrayList < Entry > ( ) ; for ( int i = 0 ; i < entries . size ( ) ; i ++ ) { if ( keep [ i ] ) { Entry curEntry = entries . get ( i ) ; reducedEntries . add ( new Entry ( curEntry . getVal ( ) , curEntry . getXIndex ( ) ) ) ; } } return reducedEntries ; }
target:  uses the douglas peuker algorithm to reduce the given List of entries