Package ghidra.graph.jung
Class JungToGDirectedGraphAdapter<V,E extends GEdge<V>>
- java.lang.Object
- 
- ghidra.graph.jung.JungToGDirectedGraphAdapter<V,E>
 
- 
- Type Parameters:
- V- the vertex type
- E- the edge type
 - All Implemented Interfaces:
- GDirectedGraph<V,E>,- GImplicitDirectedGraph<V,E>
 
 public class JungToGDirectedGraphAdapter<V,E extends GEdge<V>> extends java.lang.Object implements GDirectedGraph<V,E> A class that turns aGraphinto aGDirectedGraph.
- 
- 
Constructor SummaryConstructors Constructor Description JungToGDirectedGraphAdapter(edu.uci.ics.jung.graph.Graph<V,E> delegate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdge(E e)Add an edgebooleanaddEdge(E edge, java.util.Collection<? extends V> vertices)booleanaddEdge(E edge, java.util.Collection<? extends V> vertices, edu.uci.ics.jung.graph.util.EdgeType edge_type)booleanaddEdge(E e, V v1, V v2)booleanaddEdge(E e, V v1, V v2, edu.uci.ics.jung.graph.util.EdgeType edgeType)booleanaddVertex(V vertex)Add a vertexbooleancontainsEdge(E edge)Test if the graph contains a given edgebooleancontainsEdge(V from, V to)Test if the graph contains an edge from one given vertex to anotherbooleancontainsVertex(V vertex)Test if the graph contains a given vertexGDirectedGraph<V,E>copy()Copy this graph.intdegree(V vertex)GDirectedGraph<V,E>emptyCopy()Creates a new instance of this graph with no vertices or edges.EfindEdge(V v1, V v2)Locates the edge object for the two verticesjava.util.Collection<E>findEdgeSet(V v1, V v2)edu.uci.ics.jung.graph.util.EdgeTypegetDefaultEdgeType()VgetDest(E directed_edge)intgetEdgeCount()Count the number of edges in the graphintgetEdgeCount(edu.uci.ics.jung.graph.util.EdgeType edge_type)java.util.Collection<E>getEdges()Retrieve all the edgesjava.util.Collection<E>getEdges(edu.uci.ics.jung.graph.util.EdgeType edge_type)edu.uci.ics.jung.graph.util.EdgeTypegetEdgeType(E edge)edu.uci.ics.jung.graph.util.Pair<V>getEndpoints(E edge)intgetIncidentCount(E edge)java.util.Collection<E>getIncidentEdges(V vertex)Returns all edges connected to the given vertexjava.util.Collection<V>getIncidentVertices(E edge)java.util.Collection<E>getInEdges(V vertex)Compute the incident edges that end at the given vertexintgetNeighborCount(V vertex)java.util.Collection<V>getNeighbors(V vertex)VgetOpposite(V vertex, E edge)java.util.Collection<E>getOutEdges(V vertex)Compute the incident edges that start at the given vertexintgetPredecessorCount(V vertex)java.util.Collection<V>getPredecessors(V vertex)Compute a vertex's predecessorsVgetSource(E directed_edge)intgetSuccessorCount(V vertex)java.util.Collection<V>getSuccessors(V vertex)Compute a vertex's successorsintgetVertexCount()Count the number of vertices in the graphjava.util.Collection<V>getVertices()Retrieve all the verticesintinDegree(V vertex)booleanisDest(V vertex, E edge)booleanisEmpty()Test if the graph is empty, i.e., contains no vertices or edgesbooleanisIncident(V vertex, E edge)booleanisNeighbor(V v1, V v2)booleanisPredecessor(V v1, V v2)booleanisSource(V vertex, E edge)booleanisSuccessor(V v1, V v2)intoutDegree(V vertex)booleanremoveEdge(E edge)Removes an edgevoidremoveEdges(java.lang.Iterable<E> edges)Removes the given edges from the graphbooleanremoveVertex(V vertex)Remove a vertexvoidremoveVertices(java.lang.Iterable<V> vertices)Removes the given vertices from the graph
 
- 
- 
- 
Method Detail- 
addEdgepublic void addEdge(E e) Description copied from interface:GDirectedGraphAdd an edge
 - 
containsEdgepublic boolean containsEdge(V from, V to) Description copied from interface:GDirectedGraphTest if the graph contains an edge from one given vertex to another- Specified by:
- containsEdgein interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- from- the source vertex
- to- the destination vertex
- Returns:
- true if such an edge exists, or false
 
 - 
emptyCopypublic GDirectedGraph<V,E> emptyCopy() Description copied from interface:GDirectedGraphCreates a new instance of this graph with no vertices or edges. This is useful when you wish to build a new graph using the same type as this graph.
 - 
copypublic GDirectedGraph<V,E> copy() Description copied from interface:GDirectedGraphCopy this graph.Note: the vertices and edges in the copy may be the same instances in the new graph and not themselves copies. 
 - 
isEmptypublic boolean isEmpty() Description copied from interface:GDirectedGraphTest if the graph is empty, i.e., contains no vertices or edges
 - 
getEdgespublic java.util.Collection<E> getEdges() Description copied from interface:GDirectedGraphRetrieve all the edges
 - 
getInEdgespublic java.util.Collection<E> getInEdges(V vertex) Description copied from interface:GDirectedGraphCompute the incident edges that end at the given vertex- Specified by:
- getInEdgesin interface- GDirectedGraph<V,E extends GEdge<V>>
- Specified by:
- getInEdgesin interface- GImplicitDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the destination vertex
- Returns:
- the in-edges to the given vertex
 
 - 
getVerticespublic java.util.Collection<V> getVertices() Description copied from interface:GDirectedGraphRetrieve all the vertices- Specified by:
- getVerticesin interface- GDirectedGraph<V,E extends GEdge<V>>
- Returns:
- the vertices
 
 - 
getOutEdgespublic java.util.Collection<E> getOutEdges(V vertex) Description copied from interface:GDirectedGraphCompute the incident edges that start at the given vertex- Specified by:
- getOutEdgesin interface- GDirectedGraph<V,E extends GEdge<V>>
- Specified by:
- getOutEdgesin interface- GImplicitDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the source vertex
- Returns:
- the out-edges from the given vertex
 
 - 
containsVertexpublic boolean containsVertex(V vertex) Description copied from interface:GDirectedGraphTest if the graph contains a given vertex- Specified by:
- containsVertexin interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the vertex
- Returns:
- true if the vertex is in the graph, or false
 
 - 
getPredecessorspublic java.util.Collection<V> getPredecessors(V vertex) Description copied from interface:GDirectedGraphCompute a vertex's predecessorsThe default implementation computes this from the in-edges - Specified by:
- getPredecessorsin interface- GDirectedGraph<V,E extends GEdge<V>>
- Specified by:
- getPredecessorsin interface- GImplicitDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the destination vertex
- Returns:
- the predecessors
 
 - 
containsEdgepublic boolean containsEdge(E edge) Description copied from interface:GDirectedGraphTest if the graph contains a given edge- Specified by:
- containsEdgein interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- edge- the ege
- Returns:
- true if the edge is in the graph, or false
 
 - 
getEdgeCountpublic int getEdgeCount() Description copied from interface:GDirectedGraphCount the number of edges in the graph- Specified by:
- getEdgeCountin interface- GDirectedGraph<V,E extends GEdge<V>>
- Returns:
- the count
 
 - 
getSuccessorspublic java.util.Collection<V> getSuccessors(V vertex) Description copied from interface:GDirectedGraphCompute a vertex's successorsThe default implementation compute this from the out-edges - Specified by:
- getSuccessorsin interface- GDirectedGraph<V,E extends GEdge<V>>
- Specified by:
- getSuccessorsin interface- GImplicitDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the source vertex
- Returns:
- the successors
 
 - 
getVertexCountpublic int getVertexCount() Description copied from interface:GDirectedGraphCount the number of vertices in the graph- Specified by:
- getVertexCountin interface- GDirectedGraph<V,E extends GEdge<V>>
- Returns:
- the count
 
 - 
inDegreepublic int inDegree(V vertex) 
 - 
getIncidentEdgespublic java.util.Collection<E> getIncidentEdges(V vertex) Description copied from interface:GDirectedGraphReturns all edges connected to the given vertex- Specified by:
- getIncidentEdgesin interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the vertex
- Returns:
- the edges
 
 - 
outDegreepublic int outDegree(V vertex) 
 - 
findEdgepublic E findEdge(V v1, V v2) Description copied from interface:GDirectedGraphLocates the edge object for the two vertices
 - 
getPredecessorCountpublic int getPredecessorCount(V vertex) 
 - 
getSuccessorCountpublic int getSuccessorCount(V vertex) 
 - 
addVertexpublic boolean addVertex(V vertex) Description copied from interface:GDirectedGraphAdd a vertex
 - 
addEdgepublic boolean addEdge(E edge, java.util.Collection<? extends V> vertices, edu.uci.ics.jung.graph.util.EdgeType edge_type) 
 - 
removeVertexpublic boolean removeVertex(V vertex) Description copied from interface:GDirectedGraphRemove a vertex- Specified by:
- removeVertexin interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertex- the vertex
- Returns:
- true
 
 - 
removeVerticespublic void removeVertices(java.lang.Iterable<V> vertices) Description copied from interface:GDirectedGraphRemoves the given vertices from the graph- Specified by:
- removeVerticesin interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- vertices- the vertices to remove
 
 - 
removeEdgespublic void removeEdges(java.lang.Iterable<E> edges) Description copied from interface:GDirectedGraphRemoves the given edges from the graph- Specified by:
- removeEdgesin interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- edges- the edges to remove
 
 - 
removeEdgepublic boolean removeEdge(E edge) Description copied from interface:GDirectedGraphRemoves an edge- Specified by:
- removeEdgein interface- GDirectedGraph<V,E extends GEdge<V>>
- Parameters:
- edge- the edge
- Returns:
- true if the graph contained the given edge
 
 - 
degreepublic int degree(V vertex) 
 - 
getNeighborCountpublic int getNeighborCount(V vertex) 
 - 
getIncidentCountpublic int getIncidentCount(E edge) 
 - 
getEdgeTypepublic edu.uci.ics.jung.graph.util.EdgeType getEdgeType(E edge) 
 - 
getDefaultEdgeTypepublic edu.uci.ics.jung.graph.util.EdgeType getDefaultEdgeType() 
 - 
getEdgespublic java.util.Collection<E> getEdges(edu.uci.ics.jung.graph.util.EdgeType edge_type) 
 - 
getEdgeCountpublic int getEdgeCount(edu.uci.ics.jung.graph.util.EdgeType edge_type) 
 
- 
 
-