/[fenfire]/fenfire/org/fenfire/util/lava/Traversals.java
ViewVC logotype

Diff of /fenfire/org/fenfire/util/lava/Traversals.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tuukkah, Sat Aug 16 00:11:30 2003 UTC revision 1.4 by tuukkah, Sat Aug 16 11:45:38 2003 UTC
# Line 113  public class Traversals { Line 113  public class Traversals {
113          }          }
114      }      }
115    
116      /** Finds components disconnected along a given non-directed property,      /** From given nodes, finds components disconnected along a given
117         *  non-directed property,
118       *  and for each component returns the node of highest degree as a       *  and for each component returns the node of highest degree as a
119       *  representative.       *  representative.
120       *  @return set of representatives, one for each component       *  @return set of representatives, one for each component
121       */       */
122      public static Set findComponents(Object property, ConstGraph g) {      public static Set findComponents(Iterator nodes, Object property,
123          // XXX "Iterator nodes" could be a parameter                                       ConstGraph g) {
         Iterator nodes = g.findN_XAA_Iter(); // FIXME doesn't find objects  
124          Set visited = new HashSet();          Set visited = new HashSet();
125          Set components = new HashSet();          Set components = new HashSet();
126          while(nodes.hasNext()) {          while(nodes.hasNext()) {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26