Package it.unimi.dsi.law.graph
Class BFS
java.lang.Object
it.unimi.dsi.law.graph.BFS
public class BFS extends Object
Computes the visit order with respect to a breadth-first visit.
- Author:
- Marco Rosa
-
Constructor Summary
Constructors Constructor Description BFS()
-
Method Summary
Modifier and Type Method Description static int[]
bfsperm(ImmutableGraph graph, int startingNode, int[] startPerm)
Return the permutation induced by the visit order of a depth-first visit.static void
main(String[] args)
-
Constructor Details
-
BFS
public BFS()
-
-
Method Details
-
bfsperm
Return the permutation induced by the visit order of a depth-first visit.- Parameters:
graph
- a graph.startingNode
- the only starting node of the visit, or -1 for a complete visit.startPerm
- a permutation that will be used to shuffle successors.- Returns:
- the permutation induced by the visit order of a depth-first visit.
-
main
- Throws:
JSAPException
IOException
-