public abstract class AbstractHyperedge extends AbstractArchetypeEdge implements Hyperedge
Hyperedge
interface to minimize the effort required to implement this interface.
This class extends UserData, which provides storage and
retrieval mechanisms for user-defined data for each edge instance.
This allows users to attach data to edges without having to extend
this class.
SetHypergraph,
AbstractHypervertexUserDataContainer.CopyActionid, m_Graphfactory, udc_delegate| Constructor and Description |
|---|
AbstractHyperedge() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
connectVertex(Hypervertex hv1)
Connects
hv1 to this edge and vice versa. |
ArchetypeEdge |
copy(ArchetypeGraph newGraph)
Creates a copy of this edge in the specified graph
newGraph,
and copies this edge's user data to the new edge. |
boolean |
disconnectVertex(Hypervertex hv1)
Disconnects
hv1 from this edge and vice versa. |
java.util.Set |
getIncidentVertices()
Returns the set of vertices which are incident to this edge.
|
protected abstract java.util.Collection |
getVertices_internal() |
protected void |
initialize()
Initializes all the data structures for this element.
|
java.lang.String |
toString()
Returns a human-readable representation of this edge.
|
equals, getEqualEdge, getEquivalentEdge, getIncidentElements, isIncident, numVerticesaddGraph_internal, getGraph, hashCode, removeGraph_internaladdUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatumfinalize, getClass, notify, notifyAll, wait, wait, waitgetEqualEdge, getEquivalentEdge, isIncident, numVerticesgetGraph, getIncidentElementsaddUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatumprotected void initialize()
AbstractElementclone() copies some information that should
not be in the new element.)initialize in class AbstractElementpublic boolean connectVertex(Hypervertex hv1)
hv1 to this edge and vice versa. If hv1 is already
incident to this edge, returns false; otherwise, returns true.
Throws IllegalArgumentException if this edge is an
orphan, or if hv1 is either an orphan or part of a different graph than this edge.connectVertex in interface HyperedgeHyperedge.connectVertex(edu.uci.ics.jung.graph.Hypervertex)public boolean disconnectVertex(Hypervertex hv1)
hv1 from this edge and vice versa. If hv1 is not
incident to this edge, returns false; otherwise, returns true.disconnectVertex in interface HyperedgeHyperedge.disconnectVertex(edu.uci.ics.jung.graph.Hypervertex)public ArchetypeEdge copy(ArchetypeGraph newGraph)
newGraph,
and copies this edge's user data to the new edge. Connects thiscopy in interface ArchetypeEdgecopy in class AbstractArchetypeEdgenewGraph - the graph in which the copied edge will be placedArchetypeEdge.copy(edu.uci.ics.jung.graph.ArchetypeGraph)public java.util.Set getIncidentVertices()
ArchetypeEdgeArchetypeVertex.
For example, returns the source and destination vertices of a
directed edge.getIncidentVertices in interface ArchetypeEdgeArchetypeEdge.getIncidentVertices()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()protected abstract java.util.Collection getVertices_internal()