Package com.ibm.wala.util.graph.impl
Class InvertingNumberedEdgeManager<T>
- java.lang.Object
-
- com.ibm.wala.util.graph.impl.InvertingNumberedEdgeManager<T>
-
- All Implemented Interfaces:
EdgeManager<T>
,NumberedEdgeManager<T>
public class InvertingNumberedEdgeManager<T> extends Object implements NumberedEdgeManager<T>
An edge manager that reverses the edges in a graph
-
-
Constructor Summary
Constructors Constructor Description InvertingNumberedEdgeManager(NumberedEdgeManager<T> original)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEdge(T src, T dst)
int
getPredNodeCount(T N)
Return the number ofimmediate predecessor
nodes of nIntSet
getPredNodeNumbers(T node)
Iterator<T>
getPredNodes(T N)
Return anIterator
over the immediate predecessor nodes of n This method never returnsnull
.int
getSuccNodeCount(T N)
Return the number ofimmediate successor
nodes of this Node in the GraphIntSet
getSuccNodeNumbers(T node)
Iterator<T>
getSuccNodes(T N)
Return an Iterator over the immediate successor nodes of nboolean
hasEdge(T src, T dst)
void
removeAllIncidentEdges(T node)
void
removeEdge(T src, T dst)
void
removeIncomingEdges(T node)
void
removeOutgoingEdges(T node)
-
-
-
Constructor Detail
-
InvertingNumberedEdgeManager
public InvertingNumberedEdgeManager(NumberedEdgeManager<T> original)
-
-
Method Detail
-
getPredNodes
public Iterator<T> getPredNodes(T N) throws IllegalArgumentException
Description copied from interface:EdgeManager
Return anIterator
over the immediate predecessor nodes of n This method never returnsnull
.- Specified by:
getPredNodes
in interfaceEdgeManager<T>
- Returns:
- an
Iterator
over the immediate predecessor nodes of this Node. - Throws:
IllegalArgumentException
-
getPredNodeCount
public int getPredNodeCount(T N) throws IllegalArgumentException
Description copied from interface:EdgeManager
Return the number ofimmediate predecessor
nodes of n- Specified by:
getPredNodeCount
in interfaceEdgeManager<T>
- Returns:
- the number of immediate predecessors of n.
- Throws:
IllegalArgumentException
-
getSuccNodes
public Iterator<T> getSuccNodes(T N) throws IllegalArgumentException
Description copied from interface:EdgeManager
Return an Iterator over the immediate successor nodes of nThis method never returns
null
.- Specified by:
getSuccNodes
in 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:EdgeManager
Return the number ofimmediate successor
nodes of this Node in the Graph- Specified by:
getSuccNodeCount
in 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:
addEdge
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
-
removeEdge
public void removeEdge(T src, T dst) throws IllegalArgumentException
- Specified by:
removeEdge
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
-
hasEdge
public boolean hasEdge(T src, T dst)
- Specified by:
hasEdge
in interfaceEdgeManager<T>
-
removeAllIncidentEdges
public void removeAllIncidentEdges(T node) throws IllegalArgumentException
- Specified by:
removeAllIncidentEdges
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
-
removeIncomingEdges
public void removeIncomingEdges(T node) throws IllegalArgumentException
- Specified by:
removeIncomingEdges
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
-
removeOutgoingEdges
public void removeOutgoingEdges(T node) throws IllegalArgumentException
- Specified by:
removeOutgoingEdges
in interfaceEdgeManager<T>
- Throws:
IllegalArgumentException
-
getSuccNodeNumbers
public IntSet getSuccNodeNumbers(T node) throws IllegalArgumentException
- Specified by:
getSuccNodeNumbers
in interfaceNumberedEdgeManager<T>
- Returns:
- the numbers identifying the immediate successors of node
- Throws:
IllegalArgumentException
-
getPredNodeNumbers
public IntSet getPredNodeNumbers(T node) throws IllegalArgumentException
- Specified by:
getPredNodeNumbers
in interfaceNumberedEdgeManager<T>
- Returns:
- the numbers identifying the immediate predecessors of node
- Throws:
IllegalArgumentException
-
-