Package jadex.tools.comanalyzer.graph
Class ComponentGroupMultiGraph
- java.lang.Object
- 
- jadex.tools.comanalyzer.graph.ComponentGroupMultiGraph
 
- 
- All Implemented Interfaces:
- edu.uci.ics.jung.graph.Graph,- edu.uci.ics.jung.graph.Hypergraph
 
 public class ComponentGroupMultiGraph extends java.lang.Object implements edu.uci.ics.jung.graph.GraphA generic Graph with edges and vertices consisting of groups of elements. The elements are in a container that inplements the IComponentGroup interface. (You cant use simply List because the edges and vertices are stored in HashMaps and Lists changes their hashcode when elements are added or removed. The List is no longer to be found in the HashMap) Edge- and vertex element are stored in this component while the vertices and edges are delegated to a different graph. This implementation provides acces to either the elements and (per delegate) to the vertex and edges of the graph.- 
- 
Field SummaryFields Modifier and Type Field Description protected edu.uci.ics.jung.graph.GraphdelegateThe delegated graphprotected java.util.Mapedge_elemetsThe map of edge elementsprotected org.apache.commons.collections15.Factoryedge_factoryFactories for edgesprotected jadex.tools.comanalyzer.graph.ComponentGroupMultiGraph.GenericSortedListedge_weightsThe edge weights is the number of edge elements contained in the edge.protected java.util.Mapvertex_elemetsThe map of vertex elementsprotected org.apache.commons.collections15.Factoryvertex_factoryFactoriy for verticesprotected jadex.tools.comanalyzer.graph.ComponentGroupMultiGraph.GenericSortedListvertex_weightsThe vertex weights is the number of edges going in or out the vertex.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedComponentGroupMultiGraph(org.apache.commons.collections15.Factory vertex_factory, org.apache.commons.collections15.Factory edge_factory, edu.uci.ics.jung.graph.Graph delegate)The constructor.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddEdge(java.lang.Object e, java.lang.Object v1, java.lang.Object v2)Adds an directed edge to the graph.booleanaddEdge(java.lang.Object e, java.lang.Object v1, java.lang.Object v2, edu.uci.ics.jung.graph.util.EdgeType edgeType)Adds an edge with a given edge type to the graph.booleanaddEdge(java.lang.Object edge, java.util.Collection vertices)Adds an edge to the graph.booleanaddEdge(java.lang.Object edge, java.util.Collection vertices, edu.uci.ics.jung.graph.util.EdgeType edge_type)Addsedgeto this graph with typeedge_type.booleanaddEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2)Adds an directed edge element with given vertex elements to the graph.booleanaddEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2, edu.uci.ics.jung.graph.util.EdgeType edgeType)Adds an edge element with given vertex elements and edge type to the graph.booleanaddVertex(java.lang.Object vertex)Adds a vertex to the graph.booleanaddVertexElement(java.lang.Object ve)Adds a new vertex containing the vertex element to the graph.booleanappendEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2)Appends an directed edge element with given vertex elements to the graph.booleanappendEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2, edu.uci.ics.jung.graph.util.EdgeType edgeType)Appends an edge element with given vertex elements and edge type to the graph.booleanappendVertexElement(java.lang.Object ve, java.lang.Object v)Append a vertex element to a vertex.voidclear()Clear all elements from the delegated graph and this graph.booleancontainsEdge(java.lang.Object edge)Returnstrueif the graph contains the edge.booleancontainsEdgeElement(java.lang.Object ee)Returnstrueif the graph contains the given edge element.booleancontainsVertex(java.lang.Object vertex)Returnstrueif the graph contains the vertex.booleancontainsVertexElement(java.lang.Object ve)Returnstrueif the graph contains the given vertex element.static ComponentGroupMultiGraphcreateInstance(org.apache.commons.collections15.Factory vertex_factory, org.apache.commons.collections15.Factory edge_factory, edu.uci.ics.jung.graph.Graph delegate)Factory method for the graph.intdegree(java.lang.Object vertex)Returns the degree (number of incident edges) of a vertex.IComponentGroupfindEdge(java.lang.Object ee)Returns the edge (group) for an edge element.java.lang.ObjectfindEdge(java.lang.Object v1, java.lang.Object v2)Returns the first edge between the two vertices.java.util.CollectionfindEdgeSet(java.lang.Object v1, java.lang.Object v2)Returns a collection of edges between the two vertices.IComponentGroupfindVertex(java.lang.Object ve)Returns the vertex (group) for a vertex element.java.util.CollectiongetAllEdgeElements()Returns all edge elements.java.util.CollectiongetAllVertexElements()Returns all vertex elements.edu.uci.ics.jung.graph.util.EdgeTypegetDefaultEdgeType()java.lang.ObjectgetDest(java.lang.Object directed_edge)Returns the destination of a directed edge.intgetEdgeCount()intgetEdgeCount(edu.uci.ics.jung.graph.util.EdgeType et)java.util.CollectiongetEdges()Returns all edges of the graph.java.util.CollectiongetEdges(edu.uci.ics.jung.graph.util.EdgeType edgeType)Returns the edges for a given edge type.edu.uci.ics.jung.graph.util.EdgeTypegetEdgeType(java.lang.Object edge)Returns the edge type of en edge.edu.uci.ics.jung.graph.util.PairgetEndpoints(java.lang.Object edge)Returns the endpoints of the edge.intgetHighestEdgeWeight()Returns the highest edge weightintgetHighestVertexWeight()Returns the highest vertex weight.intgetIncidentCount(java.lang.Object edge)Returns 2 if the edge has two different endpoints.java.util.CollectiongetIncidentEdges(java.lang.Object vertex)Returns the incident edges of the vertex.java.util.CollectiongetIncidentVertices(java.lang.Object edge)java.util.CollectiongetInEdges(java.lang.Object vertex)Returns the incoming edges of the vertex.intgetNeighborCount(java.lang.Object vertex)Returns the neighbor count.java.util.CollectiongetNeighbors(java.lang.Object vertex)Returns the neighbor vertices of a given vertex.java.lang.ObjectgetOpposite(java.lang.Object vertex, java.lang.Object edge)Returns the other endpoint of the edge.java.util.CollectiongetOutEdges(java.lang.Object vertex)Returns the outgoing edges of the vertex.intgetPredecessorCount(java.lang.Object vertex)Returns the number of vertices that have an outgoing edge to the given vertex.java.util.CollectiongetPredecessors(java.lang.Object vertex)Returns the vertices that have an outgoing edge to the given vertex.java.lang.ObjectgetSource(java.lang.Object directed_edge)Returns the source of a directed edge.intgetSuccessorCount(java.lang.Object vertex)Returns the number of vertices that have an incoming edge from the given vertex.java.util.CollectiongetSuccessors(java.lang.Object vertex)Returns the vertices that have an incoming edge from the given vertex.intgetVertexCount()java.util.CollectiongetVertices()Returns all vertices of the graph.intinDegree(java.lang.Object vertex)Returns the count of incoming edges to the vertex.booleanisDest(java.lang.Object vertex, java.lang.Object edge)Returnstrueif the vertex is the destination of the edge.booleanisIncident(java.lang.Object vertex, java.lang.Object edge)Returnstrueifvertexandedgeare incident to each other.booleanisNeighbor(java.lang.Object v1, java.lang.Object v2)Returnstrueifv1andv2share an incident edge.booleanisPredecessor(java.lang.Object v1, java.lang.Object v2)Returnstrueif there is an edge from first vertex to the second vertex.booleanisSource(java.lang.Object vertex, java.lang.Object edge)Returnstrueif the vertex is the source of the edge.booleanisSuccessor(java.lang.Object v1, java.lang.Object v2)Returnstrueif there is an edge from second vertex to the first vertex.intoutDegree(java.lang.Object vertex)Returns the count of outgoing edges from the vertex.booleanremoveEdge(java.lang.Object edge)Removes an edge.booleanremoveEdgeElement(java.lang.Object ee)Removes an edge element from the graph.booleanremoveVertex(java.lang.Object vertex)Removes a vertex.booleanremoveVertexElement(java.lang.Object ve)Removes a vertex element from the graph.java.lang.StringtoString()Text representation for this graph
 
- 
 - 
- 
Field Detail- 
vertex_factoryprotected org.apache.commons.collections15.Factory vertex_factory Factoriy for vertices
 - 
edge_factoryprotected org.apache.commons.collections15.Factory edge_factory Factories for edges
 - 
edge_elemetsprotected java.util.Map edge_elemets The map of edge elements
 - 
vertex_elemetsprotected java.util.Map vertex_elemets The map of vertex elements
 - 
delegateprotected edu.uci.ics.jung.graph.Graph delegate The delegated graph
 - 
edge_weightsprotected jadex.tools.comanalyzer.graph.ComponentGroupMultiGraph.GenericSortedList edge_weights The edge weights is the number of edge elements contained in the edge. The list is sorted that the edge with the highest number of elements is at the end of the list. The highest edge weight is therefore identified by accessing the last element of the list.
 - 
vertex_weightsprotected jadex.tools.comanalyzer.graph.ComponentGroupMultiGraph.GenericSortedList vertex_weights The vertex weights is the number of edges going in or out the vertex. The list is sorted that the vertex with the highest number of incident edges is at the end of the list. The highest vertex weight is therefore identified by accessing the last element of the list
 
- 
 - 
Constructor Detail- 
ComponentGroupMultiGraphprotected ComponentGroupMultiGraph(org.apache.commons.collections15.Factory vertex_factory, org.apache.commons.collections15.Factory edge_factory, edu.uci.ics.jung.graph.Graph delegate)The constructor. Besides the delegated graph, you must provide factories for the vertex and edges, since its not possible to instantiate type bound parameter (at least not that easy)- Parameters:
- vertex_factory- The factory for vertices.
- edge_factory- The factory for edges.
- delegate- The delegated graph.
 
 
- 
 - 
Method Detail- 
createInstancepublic static ComponentGroupMultiGraph createInstance(org.apache.commons.collections15.Factory vertex_factory, org.apache.commons.collections15.Factory edge_factory, edu.uci.ics.jung.graph.Graph delegate) Factory method for the graph.- Parameters:
- vertex_factory- The factory for vertices.
- edge_factory- The factory for edges.
- delegate- The delegated graph.
- Returns:
- The ComponentGroupMultiGraph.
 
 - 
clearpublic void clear() Clear all elements from the delegated graph and this graph.
 - 
addVertexElementpublic boolean addVertexElement(java.lang.Object ve) Adds a new vertex containing the vertex element to the graph.- Parameters:
- ve- The vertex element to add.
- Returns:
- trueif success.
 
 - 
appendVertexElementpublic boolean appendVertexElement(java.lang.Object ve, java.lang.Object v)Append a vertex element to a vertex.- Parameters:
- ve- The vertex element to append.
- v- The vertex the element is append to.
- Returns:
- trueif success.
 
 - 
addEdgeElementpublic boolean addEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2, edu.uci.ics.jung.graph.util.EdgeType edgeType)Adds an edge element with given vertex elements and edge type to the graph. If the two vertex elements are already part of vertices, a new edge between these vertices is added. If the vertex elements dont already exist in the graph, new vertices are created. A new edge is created in any case.- Returns:
- trueif success.
 
 - 
addEdgeElementpublic boolean addEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2)Adds an directed edge element with given vertex elements to the graph. If the two vertex elements are already part of vertices, a new edge between these vertices is added. If the vertex elements dont already exist in the graph, new vertices are created. A new edge is created in any case.- Returns:
- trueif success.
 
 - 
appendEdgeElementpublic boolean appendEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2)Appends an directed edge element with given vertex elements to the graph. If the two vertex elements are already part of vertices, and these vertices have a connection, the edge element is appended to this edge. Otherwise the components are added as new edge and new vertices to the graph.- Returns:
- trueif success.
 
 - 
appendEdgeElementpublic boolean appendEdgeElement(java.lang.Object ee, java.lang.Object ve1, java.lang.Object ve2, edu.uci.ics.jung.graph.util.EdgeType edgeType)Appends an edge element with given vertex elements and edge type to the graph. If the two vertex elements are already part of vertices, and these vertices have a connection, the edge element is appended to this edge. Otherwise the components are added as a new edge and new vertices to the graph. The type of the edge can be directed or undirected- Returns:
- trueif success.
 
 - 
findEdgepublic IComponentGroup findEdge(java.lang.Object ee) Returns the edge (group) for an edge element.- Parameters:
- ee- The edge element to find.
- Returns:
- The edge for this element.
 
 - 
findVertexpublic IComponentGroup findVertex(java.lang.Object ve) Returns the vertex (group) for a vertex element.- Parameters:
- ve- The vertex element to find
- Returns:
- The vertex for this element.
 
 - 
containsEdgeElementpublic boolean containsEdgeElement(java.lang.Object ee) Returnstrueif the graph contains the given edge element.- Parameters:
- ee- The edge element to query
- Returns:
- trueif present
 
 - 
containsVertexElementpublic boolean containsVertexElement(java.lang.Object ve) Returnstrueif the graph contains the given vertex element.- Parameters:
- ve- The vertex element to query
- Returns:
- trueif success
 
 - 
removeEdgeElementpublic boolean removeEdgeElement(java.lang.Object ee) Removes an edge element from the graph.- Parameters:
- ee- The edge element to remove
- Returns:
- trueif success.
 
 - 
removeVertexElementpublic boolean removeVertexElement(java.lang.Object ve) Removes a vertex element from the graph.- Parameters:
- ve- The vertex element to remove
- Returns:
- trueif success
 
 - 
getAllEdgeElementspublic java.util.Collection getAllEdgeElements() Returns all edge elements.- Returns:
- The collection of all edge elements.
 
 - 
getAllVertexElementspublic java.util.Collection getAllVertexElements() Returns all vertex elements.- Returns:
- The collection of all vertex elements.
 
 - 
getHighestEdgeWeightpublic int getHighestEdgeWeight() Returns the highest edge weight- Returns:
- The highest weight of all edges.
 
 - 
getHighestVertexWeightpublic int getHighestVertexWeight() Returns the highest vertex weight.- Returns:
- The highest weight of all vertices.
 
 - 
addEdgepublic boolean addEdge(java.lang.Object edge, java.util.Collection vertices)Adds an edge to the graph.- Specified by:
- addEdgein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edge- The edge.
- vertices- A collection of veritexes. The size of the Collection must be 2.
- Returns:
- trueif success.
 
 - 
addEdgepublic boolean addEdge(java.lang.Object e, java.lang.Object v1, java.lang.Object v2, edu.uci.ics.jung.graph.util.EdgeType edgeType)Adds an edge with a given edge type to the graph.- Specified by:
- addEdgein interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- e- The edge.
- v1- The first vertex.
- v2- The second vertex.
- edgeType- The edge type.
- Returns:
- trueif success.
 
 - 
addEdgepublic boolean addEdge(java.lang.Object edge, java.util.Collection vertices, edu.uci.ics.jung.graph.util.EdgeType edge_type)Addsedgeto this graph with typeedge_type. Fails under the following circumstances:- edge is already an element of the graph 
 
- edge or verticesisnull
- vertices has the wrong number of vertices for the graph type
- vertices are already connected by another edge in this graph, and this graph does not accept parallel edges
- edge_type is not legal for this graph
 - Specified by:
- addEdgein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edge-
- vertices-
- Returns:
- trueif the add is successful, and- falseotherwise
- Throws:
- java.lang.IllegalArgumentException- if- edgeor- verticesis null, or if a different vertex set in this graph is already connected by- edge, or if- verticesare not a legal vertex set for- edge
 - 
addEdgepublic boolean addEdge(java.lang.Object e, java.lang.Object v1, java.lang.Object v2)Adds an directed edge to the graph.- Specified by:
- addEdgein interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- e- The edge.
- v1- The first vertex.
- v2- The second vertex.
- Returns:
- trueif success.
 
 - 
addVertexpublic boolean addVertex(java.lang.Object vertex) Adds a vertex to the graph.- Specified by:
- addVertexin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- trueif success.
 
 - 
removeEdgepublic boolean removeEdge(java.lang.Object edge) Removes an edge.- Specified by:
- removeEdgein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edge- The edge to remove.
- Returns:
- trueif success.
 
 - 
removeVertexpublic boolean removeVertex(java.lang.Object vertex) Removes a vertex.- Specified by:
- removeVertexin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- trueif success.
 
 - 
isIncidentpublic boolean isIncident(java.lang.Object vertex, java.lang.Object edge)Returnstrueifvertexandedgeare incident to each other. Equivalent togetIncidentEdges(vertex).contains(edge)and togetIncidentVertices(edge).contains(vertex).- Specified by:
- isIncidentin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex-
- edge-
- Returns:
- trueif- vertexand- edgeare incident to each other
 
 - 
isNeighborpublic boolean isNeighbor(java.lang.Object v1, java.lang.Object v2)Returnstrueifv1andv2share an incident edge. Equivalent togetNeighbors(v1).contains(v2).- Specified by:
- isNeighborin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- v1- the first vertex to test
- v2- the second vertex to test
- Returns:
- trueif- v1and- v2share an incident edge
 
 - 
containsEdgepublic boolean containsEdge(java.lang.Object edge) Returnstrueif the graph contains the edge.- Specified by:
- containsEdgein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edge- The edge.
- Returns:
- trueif the edge is in the graph.
 
 - 
containsVertexpublic boolean containsVertex(java.lang.Object vertex) Returnstrueif the graph contains the vertex.- Specified by:
- containsVertexin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- trueif the vertex is in the graph.
 
 - 
degreepublic int degree(java.lang.Object vertex) Returns the degree (number of incident edges) of a vertex.- Specified by:
- degreein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The degree.
 
 - 
findEdgepublic java.lang.Object findEdge(java.lang.Object v1, java.lang.Object v2)Returns the first edge between the two vertices.- Specified by:
- findEdgein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- v1- The first vertex.
- v2- The second vertex.
- Returns:
- The edge or nullif there is no incident edge between the vertices.
 
 - 
findEdgeSetpublic java.util.Collection findEdgeSet(java.lang.Object v1, java.lang.Object v2)Returns a collection of edges between the two vertices.- Specified by:
- findEdgeSetin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- v1- The first vertex.
- v2- The second vertex.
- Returns:
- The collection of edges or nullif there is no incident edge between the vertices.
 
 - 
getDestpublic java.lang.Object getDest(java.lang.Object directed_edge) Returns the destination of a directed edge.- Specified by:
- getDestin interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- getDestin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- directed_edge- The edge.
- Returns:
- The vertex.
 
 - 
getEdgeCountpublic int getEdgeCount() - Specified by:
- getEdgeCountin interface- edu.uci.ics.jung.graph.Hypergraph
- Returns:
- The edge count.
 
 - 
getEdgeCountpublic int getEdgeCount(edu.uci.ics.jung.graph.util.EdgeType et) - Specified by:
- getEdgeCountin interface- edu.uci.ics.jung.graph.Hypergraph
- Returns:
- The edge count.
 
 - 
getEdgespublic java.util.Collection getEdges() Returns all edges of the graph.- Specified by:
- getEdgesin interface- edu.uci.ics.jung.graph.Hypergraph
- Returns:
- The collection of edges.
 
 - 
getEdgespublic java.util.Collection getEdges(edu.uci.ics.jung.graph.util.EdgeType edgeType) Returns the edges for a given edge type.- Specified by:
- getEdgesin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edgeType- The edge tzpe.
- Returns:
- The collection of edges.
 
 - 
getEdgeTypepublic edu.uci.ics.jung.graph.util.EdgeType getEdgeType(java.lang.Object edge) Returns the edge type of en edge.- Specified by:
- getEdgeTypein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edge- The edge.
- Returns:
- The edge type.
 
 - 
getEndpointspublic edu.uci.ics.jung.graph.util.Pair getEndpoints(java.lang.Object edge) Returns the endpoints of the edge.- Specified by:
- getEndpointsin interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- edge- The edge.
- Returns:
- The endpoints.
 
 - 
getIncidentCountpublic int getIncidentCount(java.lang.Object edge) Returns 2 if the edge has two different endpoints. If ist a loop the method returns 1.- Specified by:
- getIncidentCountin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- edge- The edge.
- Returns:
- The incident count.
 
 - 
getIncidentEdgespublic java.util.Collection getIncidentEdges(java.lang.Object vertex) Returns the incident edges of the vertex.- Specified by:
- getIncidentEdgesin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The collection of edges.
 
 - 
getIncidentVerticespublic java.util.Collection getIncidentVertices(java.lang.Object edge) - Specified by:
- getIncidentVerticesin interface- edu.uci.ics.jung.graph.Hypergraph
 
 - 
getInEdgespublic java.util.Collection getInEdges(java.lang.Object vertex) Returns the incoming edges of the vertex.- Specified by:
- getInEdgesin interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- getInEdgesin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertx
- Returns:
- The collection of edges.
 
 - 
getNeighborCountpublic int getNeighborCount(java.lang.Object vertex) Returns the neighbor count.- Specified by:
- getNeighborCountin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The count of neighbors.
 
 - 
getNeighborspublic java.util.Collection getNeighbors(java.lang.Object vertex) Returns the neighbor vertices of a given vertex.- Specified by:
- getNeighborsin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The collection of neighbors.
 
 - 
getOppositepublic java.lang.Object getOpposite(java.lang.Object vertex, java.lang.Object edge)Returns the other endpoint of the edge.- Specified by:
- getOppositein interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- vertex- The vertex.
- edge- The edge.
- Returns:
- The opposit.
 
 - 
getOutEdgespublic java.util.Collection getOutEdges(java.lang.Object vertex) Returns the outgoing edges of the vertex.- Specified by:
- getOutEdgesin interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- getOutEdgesin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertx
- Returns:
- The collection of edges.
 
 - 
getPredecessorCountpublic int getPredecessorCount(java.lang.Object vertex) Returns the number of vertices that have an outgoing edge to the given vertex.- Specified by:
- getPredecessorCountin interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- vertex- The vertex.
- Returns:
- The predecessor count.
 
 - 
getPredecessorspublic java.util.Collection getPredecessors(java.lang.Object vertex) Returns the vertices that have an outgoing edge to the given vertex.- Specified by:
- getPredecessorsin interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- getPredecessorsin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The collection of vertices.
 
 - 
getSourcepublic java.lang.Object getSource(java.lang.Object directed_edge) Returns the source of a directed edge.- Specified by:
- getSourcein interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- getSourcein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- directed_edge- The edge.
- Returns:
- The vertex.
 
 - 
getSuccessorCountpublic int getSuccessorCount(java.lang.Object vertex) Returns the number of vertices that have an incoming edge from the given vertex.- Specified by:
- getSuccessorCountin interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- vertex- The vertex.
- Returns:
- The successor count.
 
 - 
getSuccessorspublic java.util.Collection getSuccessors(java.lang.Object vertex) Returns the vertices that have an incoming edge from the given vertex.- Specified by:
- getSuccessorsin interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- getSuccessorsin interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The collection of vertices.
 
 - 
getVertexCountpublic int getVertexCount() - Specified by:
- getVertexCountin interface- edu.uci.ics.jung.graph.Hypergraph
- Returns:
- The vertex count.
 
 - 
getVerticespublic java.util.Collection getVertices() Returns all vertices of the graph.- Specified by:
- getVerticesin interface- edu.uci.ics.jung.graph.Hypergraph
- Returns:
- The collection of vertices.
 
 - 
inDegreepublic int inDegree(java.lang.Object vertex) Returns the count of incoming edges to the vertex.- Specified by:
- inDegreein interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- inDegreein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The incoming degree.
 
 - 
isDestpublic boolean isDest(java.lang.Object vertex, java.lang.Object edge)Returnstrueif the vertex is the destination of the edge.- Specified by:
- isDestin interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- vertex- The vertex.
- edge- The edge.
- Returns:
- trueif the vertex is the destination.
 
 - 
isPredecessorpublic boolean isPredecessor(java.lang.Object v1, java.lang.Object v2)Returnstrueif there is an edge from first vertex to the second vertex.- Specified by:
- isPredecessorin interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- v1- The first vertex.
- v2- The second vertex.
- Returns:
- trueif the first vertex is predecessor of the second vertex.
 
 - 
isSourcepublic boolean isSource(java.lang.Object vertex, java.lang.Object edge)Returnstrueif the vertex is the source of the edge.- Specified by:
- isSourcein interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- vertex- The vertex.
- edge- The edge.
- Returns:
- trueif the vertex is the source.
 
 - 
isSuccessorpublic boolean isSuccessor(java.lang.Object v1, java.lang.Object v2)Returnstrueif there is an edge from second vertex to the first vertex.- Specified by:
- isSuccessorin interface- edu.uci.ics.jung.graph.Graph
- Parameters:
- v1- The first vertex.
- v2- The second vertex.
- Returns:
- trueif the second vertex is successor of the fist vertex.
 
 - 
outDegreepublic int outDegree(java.lang.Object vertex) Returns the count of outgoing edges from the vertex.- Specified by:
- outDegreein interface- edu.uci.ics.jung.graph.Graph
- Specified by:
- outDegreein interface- edu.uci.ics.jung.graph.Hypergraph
- Parameters:
- vertex- The vertex.
- Returns:
- The outgoing degree.
 
 - 
toStringpublic java.lang.String toString() Text representation for this graph- Overrides:
- toStringin class- java.lang.Object
- See Also:
- Object.toString()
 
 - 
getDefaultEdgeTypepublic edu.uci.ics.jung.graph.util.EdgeType getDefaultEdgeType() - Specified by:
- getDefaultEdgeTypein interface- edu.uci.ics.jung.graph.Hypergraph
 
 
- edge or 
 
- 
 
-