コード例 #1
0
ファイル: Dijkstra.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
//ORIGINAL LINE: private org.neo4j.graphdb.traversal.Traverser traverser(org.neo4j.graphdb.Node start, final org.neo4j.graphdb.Node end, org.neo4j.graphalgo.impl.util.PathInterest<double> interest)
        private Traverser Traverser(Node start, Node end, PathInterest <double> interest)
        {
            PathExpander  dijkstraExpander;
            PathEvaluator dijkstraEvaluator;

            if (_stateInUse)
            {
                dijkstraExpander  = _expander;
                dijkstraEvaluator = Evaluators.includeWhereEndNodeIs(end);
            }
            else
            {
                MutableDouble shortestSoFar = new MutableDouble(double.MaxValue);
                dijkstraExpander  = new DijkstraPathExpander(_expander, shortestSoFar, _epsilon, interest.StopAfterLowestCost());
                dijkstraEvaluator = new DijkstraEvaluator(shortestSoFar, end, _costEvaluator);
            }
            _lastTraverser = (new MonoDirectionalTraversalDescription()).uniqueness(Uniqueness.NODE_PATH).expand(dijkstraExpander, _stateFactory).order(new DijkstraSelectorFactory(interest, _costEvaluator)).evaluator(dijkstraEvaluator).traverse(start);
            return(_lastTraverser);
        }