|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectslib.sglib.algo.graph.traversal.classical.BFS
public class BFS
Class used to perform traversal on a graph using Breadth First Search (BFS). Algorithm start from a set of vertices and can be tuned to only consider particular types of relationships. Important: The graph is not expected to be modified during the traversal. Traversal is made on the fly i.e. iteratively next calls to the next methods. more about BFS
Constructor Summary | |
---|---|
BFS(slib.sglib.model.graph.G g,
Set<org.openrdf.model.URI> sources,
slib.sglib.model.graph.utils.WalkConstraint wc)
Creates an instance of BFS used to perform a Bread First Search Traversal over the graph. |
|
BFS(slib.sglib.model.graph.G g,
org.openrdf.model.URI source,
slib.sglib.model.graph.utils.WalkConstraint wc)
Creates an instance of BFS used to perform a Bread First Search Traversal over the graph. |
Method Summary | |
---|---|
boolean |
hasNext()
Check if the traversal is finished. |
org.openrdf.model.URI |
next()
Access to the next vertex reached by the BFS. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BFS(slib.sglib.model.graph.G g, Set<org.openrdf.model.URI> sources, slib.sglib.model.graph.utils.WalkConstraint wc)
g
- the graph to considersources
- the set of vertices considered as sources of the traversal
i.e. from which the traversal startwc
- the constraint applied to the walkpublic BFS(slib.sglib.model.graph.G g, org.openrdf.model.URI source, slib.sglib.model.graph.utils.WalkConstraint wc)
g
- the graph to considersource
- the source of the traversal i.e. from which the traversal
startwc
- the constraint applied to the walkMethod Detail |
---|
public boolean hasNext()
hasNext
in interface GraphTraversal
public org.openrdf.model.URI next()
next
in interface GraphTraversal
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |