Beispiel #1
0
        /// <summary>
        /// Navigates the graph from a focal vertex to successors.
        /// </summary>
        /// <param name="graph">The graph to navigate</param>
        /// <param name="vertex">The vertex to start at</param>
        /// <param name="visitor">The visitor to call at each vertex</param>
        public static void NavigateGraph(
            Graph graph,
            object vertex,
            GraphVisitor visitor)
        {
            GraphNavigator n = new ForwardGraphNavigator(graph);

            n.Navigate(vertex, visitor);
        }
Beispiel #2
0
 /// <summary>
 /// Traverses the graph visiting successors starting at a given vertex
 /// </summary>
 /// <param name="vertex">The focal vertex</param>
 public virtual void Navigate(
     object vertex,
     GraphVisitor visitor)
 {
     ForwardGraphNavigator.NavigateGraph(this, vertex, visitor);
 }