private int lowerBound ( JoinFilterFunction searchFunction , int [ ] links , int first , int last , int probePosition , Page allProbeChannelsPage ) { int middle ; int step ; int count = last - first ; while ( count > 0 ) { step = count / 2 ; middle = first + step ; if ( ! applySearchFunction ( searchFunction , links , middle , probePosition , allProbeChannelsPage ) ) { first = ++ middle ; count -= step + 1 ; } else { count = step ; } } return first ; }
Find the first element in position links that is NOT smaller than probePosition