aima-csharp/search/framework/Node.cs
/// <summary>
///     Returns the path from the root node to this node.
/// </summary>
Returns the path from the root node to this node.
Returns the path from the root node to this node .
public List<Node> GetPathFromRoot()
        {
            var path = new List<Node>();
            var current = this;
            while (true)
            {
                path.Insert(0, current);
                if (current.IsRoot())
                {
                    break;
                }
                current = current.Parent;
            }
            return path;
        }
public List < Node > GetPathFromRoot ( ) { var path = new List < Node > ( ) ; var current = this ; while ( true ) { path . Insert ( 0 , current ) ; if ( current . IsRoot ( ) ) { break ; } current = current . Parent ; } return path ; }
Returns the path from the root node to this node.
Returns the path from the root node to this node .