Esempio n. 1
0
        protected internal override WeightedPath FetchNextOrNull()
        {
            if (!_interest.stillInteresting(++_foundTotal))
            {
                return(null);
            }
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            if (!_paths.hasNext())
            {
                return(null);
            }
//JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops:
            WeightedPath path = new WeightedPathImpl(_costEvaluator, _paths.next());

            if (_interest.stopAfterLowestCost() && _foundWeight != null && NoneStrictMath.compare(path.Weight(), _foundWeight.Value, _epsilon) > 0)
            {
                return(null);
            }
            _foundWeight = path.Weight();
            return(path);
        }