Package com.ibm.wala.util.graph.impl
Class InvertingEdgeManager<T>
- java.lang.Object
-
- com.ibm.wala.util.graph.impl.InvertingEdgeManager<T>
-
- All Implemented Interfaces:
EdgeManager<T>
public class InvertingEdgeManager<T> extends Object implements EdgeManager<T>
An edge manager that reverses the edges in a graph
-
-
Constructor Summary
Constructors Constructor Description InvertingEdgeManager(EdgeManager<T> original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdge(T src, T dst)intgetPredNodeCount(T N)Return the number ofimmediate predecessornodes of nIterator<T>getPredNodes(@Nullable T N)Return anIteratorover the immediate predecessor nodes of nintgetSuccNodeCount(T N)Return the number ofimmediate successornodes of this Node in the GraphIterator<T>getSuccNodes(@Nullable T N)Return an Iterator over the immediate successor nodes of nbooleanhasEdge(@Nullable T src, @Nullable T dst)voidremoveAllIncidentEdges(T node)voidremoveEdge(T src, T dst)voidremoveIncomingEdges(T node)voidremoveOutgoingEdges(T node)
-
-
-
Constructor Detail
-
InvertingEdgeManager
public InvertingEdgeManager(EdgeManager<T> original)
-
-
Method Detail
-
getPredNodes
public Iterator<T> getPredNodes(@Nullable T N) throws IllegalArgumentException
Description copied from interface:EdgeManagerReturn anIteratorover the immediate predecessor nodes of nThis method never returns
null.- Specified by:
getPredNodesin interfaceEdgeManager<T>- Returns:
- an
Iteratorover the immediate predecessor nodes of this Node. - Throws:
IllegalArgumentException
-
getPredNodeCount
public int getPredNodeCount(T N) throws IllegalArgumentException
Description copied from interface:EdgeManagerReturn the number ofimmediate predecessornodes of n- Specified by:
getPredNodeCountin interfaceEdgeManager<T>- Returns:
- the number of immediate predecessors of n.
- Throws:
IllegalArgumentException
-
getSuccNodes
public Iterator<T> getSuccNodes(@Nullable T N) throws IllegalArgumentException
Description copied from interface:EdgeManagerReturn an Iterator over the immediate successor nodes of nThis method never returns
null.- Specified by:
getSuccNodesin interfaceEdgeManager<T>- Returns:
- an Iterator over the immediate successor nodes of n
- Throws:
IllegalArgumentException
-
getSuccNodeCount
public int getSuccNodeCount(T N) throws IllegalArgumentException
Description copied from interface:EdgeManagerReturn the number ofimmediate successornodes of this Node in the Graph- Specified by:
getSuccNodeCountin interfaceEdgeManager<T>- Returns:
- the number of immediate successor Nodes of this Node in the Graph.
- Throws:
IllegalArgumentException
-
addEdge
public void addEdge(T src, T dst) throws IllegalArgumentException
- Specified by:
addEdgein interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
removeEdge
public void removeEdge(T src, T dst) throws IllegalArgumentException
- Specified by:
removeEdgein interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
hasEdge
public boolean hasEdge(@Nullable T src, @Nullable T dst)
- Specified by:
hasEdgein interfaceEdgeManager<T>
-
removeAllIncidentEdges
public void removeAllIncidentEdges(T node) throws IllegalArgumentException
- Specified by:
removeAllIncidentEdgesin interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
removeIncomingEdges
public void removeIncomingEdges(T node) throws IllegalArgumentException
- Specified by:
removeIncomingEdgesin interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
removeOutgoingEdges
public void removeOutgoingEdges(T node) throws IllegalArgumentException
- Specified by:
removeOutgoingEdgesin interfaceEdgeManager<T>- Throws:
IllegalArgumentException
-
-