A - The type of the nodes' ID valuesL - The type of the nodes' label metadataW - The type of the weight metadata on the edgespublic final class AdjListGraph<A,L,W> extends Object implements Graph<A,ValueNode<A,L>,ValueEdge<A,L,W>,HashSet<ValueEdge<A,L,W>>,AdjListGraph<A,L,W>>
ValueNode, ValueEdge, and ValueContext
to minimize the need supplying type parameters| Modifier and Type | Method and Description |
|---|---|
AdjListGraph<A,L,W> |
addEdge(ValueEdge<A,L,W> edge) |
AdjListGraph<A,L,W> |
addNode(ValueNode<A,L> node) |
Choice2<AdjListGraph<A,L,W>,Tuple2<Context<A,ValueNode<A,L>,ValueEdge<A,L,W>,HashSet<ValueEdge<A,L,W>>>,AdjListGraph<A,L,W>>> |
atNode(ValueNode<A,L> node)
|
Maybe<Tuple2<Context<A,ValueNode<A,L>,ValueEdge<A,L,W>,HashSet<ValueEdge<A,L,W>>>,AdjListGraph<A,L,W>>> |
decompose()
Implementation-dependent and possibly non-deterministic decomposition of a graph into a
Context
and the rest of the graph |
static <A,L,W> AdjListGraph<A,L,W> |
emptyGraph()
Create a new, empty
AdjListGraph |
static <A> AdjListGraph<A,Unit,Unit> |
fromChain(Iterable<A> values)
Create an unlabeled, unweighted
AdjListGraph using an iterable of node ID values |
static <A> AdjListGraph<A,Unit,Unit> |
fromChains(Iterable<Iterable<A>> values)
Create an unlabeled, unweighted
AdjListGraph from iterables of node ID values |
static <A,L,W> AdjListGraph<A,L,W> |
fromEdge(ValueEdge<A,L,W> edge)
|
static <A,L,W> AdjListGraph<A,L,W> |
fromEdges(Iterable<ValueEdge<A,L,W>> edges)
Create an
AdjListGraph from an iterable of ValueEdge |
Boolean |
isEmpty() |
AdjListGraph<A,L,W> |
removeEdge(ValueEdge<A,L,W> edge) |
AdjListGraph<A,L,W> |
removeNode(ValueNode<A,L> node) |
static <A,L,W> AdjListGraph<A,L,W> |
singletonGraph(ValueNode<A,L> a)
Create an
AdjListGraph with a single ValueNode and no edges |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEdge, addNode, atNode, guidedCutFold, guidedFold, removeEdge, removeNode, simpleCutFold, simpleFoldpublic Boolean isEmpty()
public static <A,L,W> AdjListGraph<A,L,W> emptyGraph()
AdjListGraphA - The type of the nodes' ID valuesL - The type of the nodes' label metadataW - The type of the weight metadata on the edgesAdjListGraph with type parameters set for nodes and edgespublic static <A,L,W> AdjListGraph<A,L,W> singletonGraph(ValueNode<A,L> a)
AdjListGraph with a single ValueNode and no edgespublic static <A,L,W> AdjListGraph<A,L,W> fromEdge(ValueEdge<A,L,W> edge)
A - The type of the nodes' ID valuesL - The type of the nodes' label metadataW - The type of the weight metadata on the edgesedge - A ValueEdgeedge and their connectionpublic static <A,L,W> AdjListGraph<A,L,W> fromEdges(Iterable<ValueEdge<A,L,W>> edges)
AdjListGraph from an iterable of ValueEdgeA - The type of the nodes' ID valuesL - The type of the nodes' label metadataW - The type of the weight metadata on the edgesedges - Iterable of ValueEdge to form the basis for the graphedgespublic static <A> AdjListGraph<A,Unit,Unit> fromChain(Iterable<A> values)
AdjListGraph using an iterable of node ID valuesA - The type of the nodes' ID valuesvalues - ID values for a string of ValueNodes connected in the order providedvaluespublic static <A> AdjListGraph<A,Unit,Unit> fromChains(Iterable<Iterable<A>> values)
AdjListGraph from iterables of node ID valuesA - The type of the nodes' ID valuesvalues - ID values for strings of ValueNodes connected in the order provided within each iterablevaluespublic Maybe<Tuple2<Context<A,ValueNode<A,L>,ValueEdge<A,L,W>,HashSet<ValueEdge<A,L,W>>>,AdjListGraph<A,L,W>>> decompose()
Context
and the rest of the graphpublic Choice2<AdjListGraph<A,L,W>,Tuple2<Context<A,ValueNode<A,L>,ValueEdge<A,L,W>,HashSet<ValueEdge<A,L,W>>>,AdjListGraph<A,L,W>>> atNode(ValueNode<A,L> node)
atNode in interface Graph<A,ValueNode<A,L>,ValueEdge<A,L,W>,HashSet<ValueEdge<A,L,W>>,AdjListGraph<A,L,W>>node - Node to find in the graph, around which to base a decompositionG if the node cannot be found, or a decomposition into a context
centered on node and the rest of the graphCopyright © 2020. All Rights Reserved.