1 25 41 package org.jgrapht.traverse; 42 43 import org.jgrapht.*; 44 import org.jgrapht.graph.*; 45 46 47 57 public class DepthFirstIteratorTest 58 extends AbstractGraphIteratorTest 59 { 60 61 63 String getExpectedStr1() 64 { 65 return "1,3,6,5,7,9,4,8,2"; 66 } 67 68 String getExpectedStr2() 69 { 70 return "1,3,6,5,7,9,4,8,2,orphan"; 71 } 72 73 AbstractGraphIterator<String , DefaultEdge> createIterator( 74 DirectedGraph<String , DefaultEdge> g, 75 String vertex) 76 { 77 AbstractGraphIterator<String , DefaultEdge> i = 78 new DepthFirstIterator<String , DefaultEdge>(g, vertex); 79 i.setCrossComponentTraversal(true); 80 81 return i; 82 } 83 } 84 | Popular Tags |