Package net.automatalib.graph
Interface ShrinkableGraph<N,E>
-
- Type Parameters:
N
- node classE
- edge class
- All Superinterfaces:
FiniteRepresentation
,Graph<N,E>
,IndefiniteGraph<N,E>
,IndefiniteSimpleGraph<N>
,Iterable<N>
,SimpleGraph<N>
- All Known Implementing Classes:
SimpleMapGraph
public interface ShrinkableGraph<N,E> extends Graph<N,E>
A graph that supports (desirably efficient) removal of nodes and edges.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.automatalib.graph.Graph
Graph.IntAbstraction<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
removeEdge(N node, E edge)
Removes an outgoing edge from the given node.default void
removeNode(N node)
Removes a node from this graph.void
removeNode(N node, @Nullable N replacement)
Removes a node from this graph, and redirects all incoming edges to the given replacement node (node that outgoing edges are still removed).-
Methods inherited from interface net.automatalib.graph.Graph
getAdjacentNodes, getOutgoingEdges, getOutgoingEdgesIterator, getVisualizationHelper
-
Methods inherited from interface net.automatalib.graph.IndefiniteGraph
getAdjacentNodesIterator, getEdgesBetween, getTarget
-
Methods inherited from interface net.automatalib.graph.IndefiniteSimpleGraph
createDynamicNodeMapping, createStaticNodeMapping, isConnected
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.graph.SimpleGraph
getNodes, iterator, nodeIDs, size
-
-
-
-
Method Detail
-
removeNode
default void removeNode(N node)
Removes a node from this graph. All incoming and outgoing edges are removed as well.- Parameters:
node
- the node to remove.
-
removeNode
void removeNode(N node, @Nullable N replacement)
Removes a node from this graph, and redirects all incoming edges to the given replacement node (node that outgoing edges are still removed). If anull
replacement is specified, then this function behaves equivalently to the aboveremoveNode(Object)
.- Parameters:
node
- the node to removereplacement
- the replacement node for incoming edges
-
-