From c7962890a37503cbfcef16ad6528a4bef5188676 Mon Sep 17 00:00:00 2001 From: jvanzyl Date: Sat, 1 Dec 2001 19:02:07 +0000 Subject: [PATCH] - adding definition for completeness. PR: Obtained from: Submitted by: Reviewed by: PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/graph/trunk@144582 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/graph/DFS.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/commons/graph/DFS.java b/src/java/org/apache/commons/graph/DFS.java index 737818b..993b6ec 100644 --- a/src/java/org/apache/commons/graph/DFS.java +++ b/src/java/org/apache/commons/graph/DFS.java @@ -59,8 +59,15 @@ import org.apache.commons.graph.visitor.Visitor; /** * Visit graph with depth first search and mark discovery and finishing time in all * vertices. + * + * Definition of a DFS: + * (1) Any search algorithm which considers outgoing edges of a vertex before + * any neighbors of the vertex, that is, outgoing edges of the vertex's predecessor in + * the search. Extremes are searched first. This is easily implemented with recursion. + * (2) An algorithm which marks all vertices in a directed graph in the order they are + * discovered and finished, partitioning the graph into a forest. * - * @version $Id: DFS.java,v 1.2 2001/11/29 14:17:33 jvanzyl Exp $ + * @version $Id: DFS.java,v 1.3 2001/12/01 19:02:07 jvanzyl Exp $ * @author M. Dahm */ public class DFS extends TraversalOrder {