@ SuppressWarnings ( { "ForLoopReplaceableByForEach" } ) protected void selectMatchSet ( List < Point > dataSet , double threshold , Model param ) { candidatePoints . clear ( ) ; modelDistance . setModel ( param ) ; for ( int i = 0 ; i < dataSet . size ( ) ; i ++ ) { Point point = dataSet . get ( i ) ; double distance = modelDistance . computeDistance ( point ) ; if ( distance < threshold ) { matchToInput [ candidatePoints . size ( ) ] = i ; candidatePoints . add ( point ) ; } } }
Looks for points in the data set which closely match the current best fit model in the optimizer .