Exemplo n.º 1
0
        protected void GenerateNodePath(N startNode, GraphPath <N> outPath)
        {
            // Work back along the path, accumulating nodes
            // outPath.clear();
            while (_current.connection != null)
            {
                outPath.Add(_current.node);
                _current = _nodeRecords[_graph.GetIndex(_current.connection.GetFromNode())];
            }

            outPath.Add(startNode);

            // Reverse the path
            outPath.reverse();
        }
Exemplo n.º 2
0
        protected void GeneratePath(N startNode, GraphPath <Connection <N> > outPath)
        {
            // Work back along the path, accumulating connections
            // outPath.clear();
            while (!_current.node.Equals(startNode))
            {
                outPath.Add(_current.connection);
                _current = _nodeRecords[_graph.GetIndex(_current.connection.GetFromNode())];
            }

            // Reverse the path
            outPath.reverse();
        }