Package | Description |
---|---|
com.asakusafw.utils.graph |
A simple graph classes.
|
Modifier and Type | Class and Description |
---|---|
class |
HashGraph<V>
|
Modifier and Type | Method and Description |
---|---|
static <V> Graph<V> |
Graphs.copy(Graph<? extends V> graph)
Returns a copy of the target graph.
|
static <V> Graph<V> |
Graphs.newInstance()
Creates a new
Graph instance without any vertices. |
static <V> Graph<V> |
Graphs.subgraph(Graph<? extends V> graph,
Predicate<? super V> matcher)
Creates a new subgraph from the target graph.
|
static <V> Graph<V> |
Graphs.transpose(Graph<V> graph)
Creates a new transposed graph from the target graph.
|
Modifier and Type | Method and Description |
---|---|
static <V> Set<V> |
Graphs.collectAllConnected(Graph<? extends V> graph,
Collection<? extends V> startNodes)
Returns the transitively connected all vertices from the starting vertices.
|
static <V> Set<V> |
Graphs.collectHeads(Graph<? extends V> graph)
Returns each head vertex in the graph, which has no preceding vertices.
|
static <V> Set<V> |
Graphs.collectNearest(Graph<? extends V> graph,
Collection<? extends V> startNodes,
Predicate<? super V> matcher)
Returns the succeeding nearest vertices which match the condition, from the starting vertices,
and vertices on their routes.
|
static <V> Set<V> |
Graphs.collectTails(Graph<? extends V> graph)
Returns each tail vertex in the graph, which has no succeeding vertices.
|
static <V> Graph<V> |
Graphs.copy(Graph<? extends V> graph)
Returns a copy of the target graph.
|
static <V> Set<Set<V>> |
Graphs.findCircuit(Graph<? extends V> graph)
Returns the all cyclic sub-graphs in the target graph.
|
static <V> Set<V> |
Graphs.findNearest(Graph<? extends V> graph,
Collection<? extends V> startNodes,
Predicate<? super V> matcher)
Returns the succeeding nearest vertices which match the condition, from the starting vertices.
|
static <V> Set<Set<V>> |
Graphs.findStronglyConnectedComponents(Graph<? extends V> graph)
Returns the all strongly connected components in the target graph.
|
static <V> List<V> |
Graphs.sortPostOrder(Graph<? extends V> graph)
Sorts the vertices from the tail to head topologically, and returns their list.
|
static <V> Graph<V> |
Graphs.subgraph(Graph<? extends V> graph,
Predicate<? super V> matcher)
Creates a new subgraph from the target graph.
|
static <V> Graph<V> |
Graphs.transpose(Graph<V> graph)
Creates a new transposed graph from the target graph.
|
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.