package javakurs.musterloesung.uebung08;

/**
 * {@link DfsGraphVisitor} extends the {@link GraphVisitorBase} interface with
 * methods required only in depth first search.
 *
 * @param <EdgeInfo>
 *          the kind of information assigned to the edges of the traversed graph
 *
 * @author Joerg Steffen, DFKI
 * @version $Id: DfsGraphVisitor.java,v 1.1 2011/01/12 16:29:36 steffen Exp $
 */
public interface DfsGraphVisitor<EdgeInfo> extends GraphVisitorBase<EdgeInfo> {

  /**
   * This method is called when a tree edge is used, before the DFS recursive
   * call.
   *
   * @param e
   *          the tree edge
   * @param g
   *          the graph to which the tree edge belongs to
   */
  void treeEdgeBefore(Edge<EdgeInfo> e, DirectedGraphBase<EdgeInfo> g);

  /**
   * This method is called when a tree edge is used, after the DFS recursive
   * call.
   *
   * @param e
   *          the tree edge
   * @param g
   *          the graph to which the tree edge belongs to
   */
  void treeEdgeAfter(Edge<EdgeInfo> e, DirectedGraphBase<EdgeInfo> g);
}
