|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectslib.sglib.algo.graph.traversal.classical.DFS
public class DFS
Class used to perform traversal on a graph using Depth First Search Algorithm
from a set of vertices and considering particular types of relationships. more about
Note that contrary to BFS
the traversal is performed at instance
creation. The iteration is then made on the stored topological sort. The
topological sort can also be retrieve.
Constructor Summary | |
---|---|
DFS(slib.sglib.model.graph.G g,
Set<org.openrdf.model.URI> sources,
slib.sglib.model.graph.utils.WalkConstraint wc)
Create a DFS iterator, note that DFS is performed at instance creation. |
|
DFS(slib.sglib.model.graph.G g,
org.openrdf.model.URI source,
slib.sglib.model.graph.utils.WalkConstraint wc)
Shortcut of DFS#DFS(G, Set, Set) |
Method Summary | |
---|---|
List<org.openrdf.model.URI> |
getTraversalOrder()
Returns the traversal ordering resulting of the DFS i.e topological sort. |
boolean |
hasNext()
Check if the traversal is finished. |
org.openrdf.model.URI |
next()
Return the next vertex of the traversal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DFS(slib.sglib.model.graph.G g, Set<org.openrdf.model.URI> sources, slib.sglib.model.graph.utils.WalkConstraint wc)
public DFS(slib.sglib.model.graph.G g, org.openrdf.model.URI source, slib.sglib.model.graph.utils.WalkConstraint wc)
DFS#DFS(G, Set, Set)
Method Detail |
---|
public boolean hasNext()
GraphTraversal
hasNext
in interface GraphTraversal
public org.openrdf.model.URI next()
GraphTraversal
next
in interface GraphTraversal
public List<org.openrdf.model.URI> getTraversalOrder()
ArrayList
of V
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |