| Package | Description |
|---|---|
| berack96.lib.graph | |
| berack96.lib.graph.impl | |
| berack96.lib.graph.visit | |
| berack96.lib.graph.visit.impl |
| Modifier and Type | Method and Description |
|---|---|
VisitInfo<V> |
Vertex.visit(VisitStrategy strategy,
java.util.function.Consumer<V> visit)
Visit the graph from this current vertex with the strategy assigned
|
VisitInfo<V> |
Graph.visit(V source,
VisitStrategy<V,W> strategy,
java.util.function.Consumer<V> visit)
Visit the graph accordingly to the strategy that is passed.
This method visit the graph from the source to all the vertex that are reachable form the source. Some strategy can accept a source vertex null, because they visit all the graph anyway. |
| Modifier and Type | Method and Description |
|---|---|
VisitInfo<V> |
MatrixGraph.visit(V source,
VisitStrategy<V,W> strategy,
java.util.function.Consumer<V> visit) |
VisitInfo<V> |
MapGraph.visit(V source,
VisitStrategy<V,W> strategy,
java.util.function.Consumer<V> visit) |
VisitInfo<V> |
AdjGraph.visit(V source,
VisitStrategy<V,W> strategy,
java.util.function.Consumer<V> visit) |
| Modifier and Type | Method and Description |
|---|---|
VisitInfo<V> |
VisitStrategy.visit(Graph<V,W> graph,
V source,
java.util.function.Consumer<V> visit)
With this the graph will be visited accordingly to the strategy of the visit.
Some strategy can accept a source vertex null, because they visit all the graph anyway. If you want to stop the visit of the graph, you just have to throw any exception in the visit function, but be sure to catch it |
| Modifier and Type | Method and Description |
|---|---|
VisitInfo<V> |
Tarjan.visit(Graph<V,W> graph,
V source,
java.util.function.Consumer<V> visit)
This particular visit strategy use only the graph and the visit, so the source param is not needed.
|
VisitInfo<V> |
Dijkstra.visit(Graph<V,W> graph,
V source,
java.util.function.Consumer<V> visit) |
VisitInfo<V> |
DFS.visit(Graph<V,W> graph,
V source,
java.util.function.Consumer<V> visit) |
VisitInfo<V> |
BFS.visit(Graph<V,W> graph,
V source,
java.util.function.Consumer<V> visit) |