| 程序包 | 说明 |
|---|---|
| io.github.openlg.graphlib | |
| io.github.openlg.graphlib.algorithms |
| 限定符和类型 | 方法和说明 |
|---|---|
Graph<N,E> |
Graph.filterNodes(Predicate<String> filter) |
Graph<N,E> |
Graph.removeEdge(Edge edge)
remove edge
|
Graph<N,E> |
Graph.removeEdge(String sourceId,
String targetId)
remove edge
|
Graph<N,E> |
Graph.removeEdge(String sourceId,
String targetId,
String name)
remove edge
|
Graph<N,E> |
Graph.removeNode(String id)
Remove the node with the id in the graph or do nothing if the node is not in the graph.
|
Graph<N,E> |
Graph.setEdge(Edge edge)
add new edge
|
Graph<N,E> |
Graph.setEdge(Edge edge,
E e)
add new edge
|
Graph<N,E> |
Graph.setEdge(String sourceId,
String targetId)
add edge
|
Graph<N,E> |
Graph.setEdge(String sourceId,
String targetId,
E e)
add edge
|
Graph<N,E> |
Graph.setEdge(String sourceId,
String targetId,
E e,
String name)
add new edge
|
Graph<N,E> |
Graph.setNode(String id)
Creates or updates the value for the node in the graph.
|
Graph<N,E> |
Graph.setNode(String id,
N n)
Creates or updates the value for the node in the graph.
|
Graph<N,E> |
Graph.setNodes(Collection<String> nodes)
Creates or updates the value for the nodes in the graph.
|
Graph<N,E> |
Graph.setNodes(Collection<String> nodes,
N n)
Creates or updates the value for the nodes in the graph.
|
Graph<N,E> |
Graph.setParent(String nodeId,
String parentId) |
Graph<N,E> |
Graph.setPath(Collection<String> path)
add multi edge by path
|
Graph<N,E> |
Graph.setPath(Collection<String> path,
E e)
add multi edge by node id's
|
Graph<N,E> |
Graph.setPath(String... nodeId)
add multi edge by node id's
|
| 限定符和类型 | 方法和说明 |
|---|---|
List<Graph<N,E>> |
Graph.components()
Finds all connected components in a graph and returns an array of these components.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<N,E> List<Graph<N,E>> |
Components.getComponents(Graph<N,E> graph)
Finds all connected components in a graph and returns an array of these components.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<N,E> List<List<String>> |
FindCycles.findCycles(Graph<N,E> graph)
Given a Graph, g, this function returns all nodes that
are part of a cycle.
|
<N,E> List<Graph<N,E>> |
Components.getComponents(Graph<N,E> graph)
Finds all connected components in a graph and returns an array of these components.
|
<N,E> boolean |
IsAcyclic.isAcyclic(Graph<N,E> graph)
Given a Graph, g, this function returns true if the
graph has no cycles and returns false if it does.
|
<N,E> List<List<String>> |
Tarjan.tarjan(Graph<N,E> graph)
This function is an implementation of Tarjan's algorithm which finds all strongly connected components in the directed graph g.
|
<N,E> List<String> |
Topsort.topsort(Graph<N,E> graph)
Given a Graph g this function returns an array of nodes such that for each edge u -> v, u appears before v in the array.
|
Copyright © 2024. All rights reserved.