[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] fenfire/org/fenfire/util/lava Traversals.java
From: |
Tuukka Hastrup |
Subject: |
[ff-cvs] fenfire/org/fenfire/util/lava Traversals.java |
Date: |
Sun, 24 Aug 2003 15:36:16 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Branch:
Changes by: Tuukka Hastrup <address@hidden> 03/08/24 15:36:15
Modified files:
org/fenfire/util/lava: Traversals.java
Log message:
return type javadoc update
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/util/lava/Traversals.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/util/lava/Traversals.java
diff -u fenfire/org/fenfire/util/lava/Traversals.java:1.6
fenfire/org/fenfire/util/lava/Traversals.java:1.7
--- fenfire/org/fenfire/util/lava/Traversals.java:1.6 Sun Aug 24 15:01:41 2003
+++ fenfire/org/fenfire/util/lava/Traversals.java Sun Aug 24 15:36:15 2003
@@ -79,8 +79,10 @@
}
/** Tests whether a given nondirected property connects the two
- nodes given. The method is to run BFS from both nodes simultaneously
- and see whether they collide. */
+ * nodes given. The method is to run BFS from both nodes simultaneously
+ * and see whether they collide, hoping that one of them dies out
+ * quickly.
+ */
public static boolean isConnected(Object a, Object property, Object b,
ConstGraph g) {
if(a == b)
@@ -140,8 +142,11 @@
/** From given nodes, finds components disconnected along a given
* non-directed property,
* and for each component returns the node of highest degree as a
- * representative.
- * @return set of representatives, one for each component
+ * representative. Additionally, gives the representative of the
+ * largest component.
+ * @return an array:
+ * the first element is a <code>Set</code> of representatives,
+ * the other element is the representative of largest component
*/
public static Object[] findComponents(Iterator nodes, Object property,
ConstGraph g) {
@@ -171,8 +176,9 @@
/** Recurses depth-first search from a given node, and finds the node
* of highest degree (with most connections).
- * @return an array: the first element is the node of highest degree
- * the second element is the highest degree as Integer
+ * @return <code>DFSRet</code> object:
+ * <code>representative</code> is the node of highest degree,
+ * <code>degree</code> is the highest degree
*/
static DFSRet recurseDFS(Object start, Object property, ConstGraph g,
Set visited, DFSRet ret) {