Interface Graph<T>
- Type Parameters:
T- the type of nodes in this graph.
- All Superinterfaces:
EdgeManager<T>, Iterable<T>, NodeManager<T>
- All Known Subinterfaces:
CallGraph, ControlFlowGraph<I,T>, HeapGraph<T>, IFlowGraph, ISDG, ISupergraph<T, P>, LabeledGraph<T, U>, MinimalCFG<T>, NumberedGraph<T>, NumberedLabeledGraph<T, I>, OrderedMultiGraph<T>, SerializableGraph<T>
- All Known Implementing Classes:
AbstractCFG, AbstractDemandFlowGraph, AbstractFlowGraph, AbstractGraph, AbstractInterproceduralCFG, AbstractLabeledGraph, AbstractNumberedGraph, AbstractNumberedLabeledGraph, AstCallGraph, AstInducedCFG, AstTranslator.AstCFG, AstTranslator.IncipientCFG, BackwardsSupergraph, BasicCallGraph, BasicGraph, BasicHeapGraph, BasicOrderedMultiGraph, CHACallGraph, CISDG, ControlDependenceGraph, CrossLanguageCallGraph, DelegatingCFG, DelegatingExplicitCallGraph, DelegatingGraph, DelegatingNumberedGraph, DemandPointerFlowGraph, DemandValueFlowGraph, DexCFG, EdgeFilteredNumberedGraph, ExplicitCallGraph, ExplodedControlFlowGraph, ExplodedInterproceduralCFG, ExtensionGraph, HeapGraphImpl, ICFGSupergraph, InducedCFG, InterproceduralCFG, InvertedGraph, InvertedNumberedGraph, JSCallGraph, JSInducedCFG, MutableCFG, PartialCallGraph, PDG, PrefixTransferGraph, PrunedCallGraph, PrunedCFG, RandomGraph, RandomGraph.IntegerRandomGraph, SDG, SelfLoopAddedGraph, ShrikeCFG, SimpleDemandPointerFlowGraph, SlowSparseNumberedGraph, SlowSparseNumberedLabeledGraph, SparseNumberedGraph, SSACFG, UriPrefixTransferGraph
Basic interface for a directed graph.
We choose to define a Graph as a composition of a NodeManager and an EdgeManager, which track nodes and edges, respectively. This way, in many cases we can compose
separate NodeManager and EdgeManager implementations to create Graph
implementations, using delegation.
-
Method Summary
Modifier and TypeMethodDescriptionvoidremove a node and all its incident edgesMethods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesModifier and TypeMethodDescriptionvoidintReturn the number ofimmediate predecessornodes of ngetPredNodes(T n) Return anIteratorover the immediate predecessor nodes of nintReturn the number ofimmediate successornodes of this Node in the GraphgetSuccNodes(T n) Return an Iterator over the immediate successor nodes of nbooleanvoidremoveAllIncidentEdges(T node) voidremoveEdge(T src, T dst) voidremoveIncomingEdges(T node) voidremoveOutgoingEdges(T node) Methods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamModifier and TypeMethodDescriptionvoidadd a node to this graphbooleancontainsNode(T n) intiterator()voidremoveNode(T n) remove a node from this graphstream()
-
Method Details
-
removeNodeAndEdges
remove a node and all its incident edges- Throws:
UnsupportedOperationException- if the graph implementation does not allow removal
-