question: int checkToAddLandmark ( final Node fromNode , final Node toNode ) { double bestTravCostEst = estimateRemainingTravelCost ( fromNode , toNode ) ; PreProcessLandmarks . LandmarksData fromRole = getPreProcessData ( fromNode ) ; PreProcessLandmarks . LandmarksData toRole = getPreProcessData ( toNode ) ; int bestIndex = - 1 ; for ( int i = 0 ; i < this . landmarks . length ; i ++ ) { double tmpTravTime = estimateRemainingTravelCost ( fromRole , toRole , i ) ; if ( tmpTravTime > bestTravCostEst ) { bestIndex = i ; bestTravCostEst = tmpTravTime ; } } if ( bestIndex != - 1 ) { int [ ] newActiveLandmarks = new int [ this . activeLandmarkIndexes . length + 1 ] ; System . arraycopy ( this . activeLandmarkIndexes , 0 , newActiveLandmarks , 0 , this . activeLandmarkIndexes . length ) ; newActiveLandmarks [ this . activeLandmarkIndexes . length ] = bestIndex ; this . activeLandmarkIndexes = newActiveLandmarks ; } return bestIndex ; }
target:  Checks whether there is a landmark in the set of the non-active landmarks that yields a better estimation than the best active landmark. If there is, this landmark is added to the set of active landmark and its index is returned.