public final class Graphs extends Object
| Modifier and Type | Method and Description |
|---|---|
static <N> com.google.common.graph.ImmutableGraph<N> |
emptyDirectedGraph()
Returns an empty directed graph (immutable).
|
static <N> com.google.common.graph.ImmutableGraph<N> |
emptyGraph(com.google.common.graph.Graph<N> graph)
Returns an empty graph (immutable) initialized with all properties queryable from
graph. |
static <N> com.google.common.graph.ImmutableGraph<N> |
emptyUndirectedGraph()
Returns an empty undirected graph (immutable).
|
static <N> void |
merge(com.google.common.graph.MutableGraph<N> graph1,
com.google.common.graph.Graph<N> graph2)
Merge all nodes and edges of two graphs.
|
static <N> com.google.common.graph.ImmutableGraph<N> |
singletonDirectedGraph(N node)
Returns an immutable directed graph, containing only the specified node.
|
static <N> com.google.common.graph.ImmutableGraph<N> |
singletonGraph(com.google.common.graph.Graph<N> graph,
N node)
Returns an immutable graph, containing only the specified node.
|
static <N> com.google.common.graph.ImmutableGraph<N> |
singletonUndirectedGraph(N node)
Returns an immutable undirected graph, containing only the specified node.
|
public static <N> com.google.common.graph.ImmutableGraph<N> emptyDirectedGraph()
N - The class of the nodespublic static <N> com.google.common.graph.ImmutableGraph<N> emptyUndirectedGraph()
N - The class of the nodespublic static <N> com.google.common.graph.ImmutableGraph<N> emptyGraph(com.google.common.graph.Graph<N> graph)
graph.N - The class of the nodesgraph - The graph to use as template for the created graphGraphBuilder.from(Graph)public static <N> com.google.common.graph.ImmutableGraph<N> singletonDirectedGraph(N node)
N - The class of the nodesnode - The single node in the returned graphpublic static <N> com.google.common.graph.ImmutableGraph<N> singletonUndirectedGraph(N node)
N - The class of the nodesnode - The single node in the returned graphpublic static <N> com.google.common.graph.ImmutableGraph<N> singletonGraph(com.google.common.graph.Graph<N> graph,
N node)
N - The class of the nodesgraph - The graph to use as template for the created graphnode - The single node in the returned graphGraphBuilder.from(Graph)public static <N> void merge(com.google.common.graph.MutableGraph<N> graph1,
com.google.common.graph.Graph<N> graph2)
N - The class of the nodesgraph1 - A MutableGraph into which all nodes and edges of graph2 will be mergedgraph2 - The Graph whose nodes and edges will be merged into graph1Copyright © 2012–2021 Graylog, Inc.. All rights reserved.