N
- The type of the Nodes in the graphE
- The type of the Edges in the graphpublic abstract class Rewire<N,E>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected EdgeLabeler<N,E> |
el |
protected Graph<N,E> |
graph |
Constructor and Description |
---|
Rewire(Graph<N,E> graph,
EdgeLabeler<N,E> el) |
Modifier and Type | Method and Description |
---|---|
void |
add(N node)
Add a single node to the graph.
|
static <N,L> Rewire<N,L> |
factory(java.lang.String algname,
Graph<N,L> graph,
EdgeLabeler<N,L> el) |
static boolean |
isaRewire(java.lang.String name)
Query whether the given string is an implemented rewire algorithm.
|
abstract void |
rewire()
Rewire the whole graph.
|
public abstract void rewire()
public void add(N node)
This may (or may not) have different resource usage relative to rewire(). E.g. it may use less memory than rewire(), but more CPU over all if called for a significant number of nodes.
This method is optional, and not all implementations support it.
node
- java.lang.UnsupportedOperationException
- If this method is not supported.public static boolean isaRewire(java.lang.String name)
name
- rewiring algorithm namepublic static final <N,L> Rewire<N,L> factory(java.lang.String algname, Graph<N,L> graph, EdgeLabeler<N,L> el)