public abstract class AbstractGraph<V,E>
extends java.lang.Object
implements edu.uci.ics.jung.graph.Graph<V,E>, java.io.Serializable
Graph
interface.
Designed to simplify implementation of new graph classes.Constructor and Description |
---|
AbstractGraph() |
Modifier and Type | Method and Description |
---|---|
boolean |
addEdge(E edge,
java.util.Collection<? extends V> vertices) |
boolean |
addEdge(E edge,
java.util.Collection<? extends V> vertices,
edu.uci.ics.jung.graph.util.EdgeType edgeType) |
boolean |
addEdge(E edge,
edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints)
Adds
edge to this graph with the specified endpoints ,
with the default edge type. |
abstract boolean |
addEdge(E edge,
edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints,
edu.uci.ics.jung.graph.util.EdgeType edgeType)
Adds
edge to this graph with the specified endpoints
and EdgeType . |
boolean |
addEdge(E e,
V v1,
V v2) |
boolean |
addEdge(E e,
V v1,
V v2,
edu.uci.ics.jung.graph.util.EdgeType edge_type) |
int |
degree(V vertex) |
E |
findEdge(V v1,
V v2) |
java.util.Collection<E> |
findEdgeSet(V v1,
V v2) |
int |
getIncidentCount(E edge) |
java.util.Collection<V> |
getIncidentVertices(E edge) |
int |
getNeighborCount(V vertex) |
V |
getOpposite(V vertex,
E edge) |
int |
getPredecessorCount(V vertex) |
int |
getSuccessorCount(V vertex) |
protected edu.uci.ics.jung.graph.util.Pair<V> |
getValidatedEndpoints(E edge,
edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints) |
int |
inDegree(V vertex) |
boolean |
isIncident(V vertex,
E edge) |
boolean |
isNeighbor(V v1,
V v2) |
boolean |
isPredecessor(V v1,
V v2) |
boolean |
isSuccessor(V v1,
V v2) |
int |
outDegree(V vertex) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public boolean addEdge(E edge, java.util.Collection<? extends V> vertices, edu.uci.ics.jung.graph.util.EdgeType edgeType)
public boolean addEdge(E edge, edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints)
edge
to this graph with the specified endpoints
,
with the default edge type.public abstract boolean addEdge(E edge, edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints, edu.uci.ics.jung.graph.util.EdgeType edgeType)
edge
to this graph with the specified endpoints
and EdgeType
.protected edu.uci.ics.jung.graph.util.Pair<V> getValidatedEndpoints(E edge, edu.uci.ics.jung.graph.util.Pair<? extends V> endpoints)
public int inDegree(V vertex)
public int outDegree(V vertex)
public int getPredecessorCount(V vertex)
public int getSuccessorCount(V vertex)
public int getNeighborCount(V vertex)
public int degree(V vertex)
public int getIncidentCount(E edge)
public java.lang.String toString()
toString
in class java.lang.Object