|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.utils.UserData
edu.uci.ics.jung.graph.impl.AbstractSparseEdge
edu.uci.ics.jung.graph.impl.UndirectedSparseEdge
edu.uci.ics.jung.graph.impl.BipartiteEdge
A simple extension of the UndirectedSparseEdge, except with careful bounds checking. The constructor throws a FatalException if its vertices are not in two classes of a BipartiteGraph. (In fact, the Vertices must come in the order CLASSA, CLASSB).
Nested Class Summary |
Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer |
UserDataContainer.CopyAction |
Field Summary |
Fields inherited from class edu.uci.ics.jung.utils.UserData |
CLONE, REMOVE, SHARED |
Constructor Summary | |
BipartiteEdge(BipartiteVertex a,
BipartiteVertex b)
The BipartiteEdge constructor. |
Method Summary | |
ArchetypeEdge |
copy(ArchetypeGraph newGraph)
Creates a copy of this edge in graph g . |
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseEdge |
equals, getEndpoints, getEqualEdge, getEquivalentEdge, getGraph, getIncidentVertices, getOpposite, hashCode, isIncident, numVertices, toString |
Methods inherited from class edu.uci.ics.jung.utils.UserData |
addUserDatum, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.uci.ics.jung.graph.Edge |
getEndpoints, getOpposite |
Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeEdge |
getEqualEdge, getEquivalentEdge, getGraph, getIncidentVertices, isIncident, numVertices |
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
addUserDatum, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum |
Constructor Detail |
public BipartiteEdge(BipartiteVertex a, BipartiteVertex b)
a
- a Vertex from a BipartiteGraph in CLASSAb
- a Vertex from the same BipartiteGraph in CLASSBMethod Detail |
public ArchetypeEdge copy(ArchetypeGraph newGraph)
ArchetypeEdge
g
. The edge created
will be equivalent to this edge: given e = this.copy(g)
,
then this.getEquivalentEdge(g) == e
,
and this.equals(e) == true
.
Given the set
of vertices S that are incident to this edge, the copied edge will be
made incident to the set of vertices S' in g
that are
equivalent to S. S must be copied into g
before
this edge can be copied into g
. If there is no
such set of vertices in g
,
this method throws IllegalArgumentException
.
Thus, for example, given the following code:
Graph g1 = new Graph(); Vertex v1 = g1.addVertex(new DirectedSparseVertex()); Vertex v2 = g1.addVertex(new DirectedSparseVertex()); ... Edge e = g1.addEdge(new DirectedSparseEdge(v1, v2)); Vertex v3 = v1.getEquivalentVertex(g2); Vertex v4 = v2.getEquivalentVertex(g2);then
e.copy(g2)
will create a directed edge
connecting v3
to v4
in g2
.
copy
in interface ArchetypeEdge
copy
in class AbstractSparseEdge
ArchetypeEdge.copy(edu.uci.ics.jung.graph.ArchetypeGraph)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |