public abstract class AbstractHypervertex extends AbstractArchetypeVertex implements Hypervertex
Hypervertex
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.
Existing subclasses maintain collections of edges, and infer neighbor collections from these classes. Independent neighbor collections are difficult to maintain for the following reasons:
Vertex
implementations
will need to provide support for edge set mutability both in the
Hypervertex
implementation and in the Hyperedge
implementation.
SetHypergraph
,
AbstractHyperedge
UserDataContainer.CopyAction
id, m_Graph
factory, udc_delegate
Constructor and Description |
---|
AbstractHypervertex() |
Modifier and Type | Method and Description |
---|---|
boolean |
connectEdge(Hyperedge e)
Connects
he to this hypervertex and vice versa. |
ArchetypeVertex |
copy(ArchetypeGraph g)
Creates a copy of this vertex in graph
g . |
boolean |
disconnectEdge(Hyperedge e)
Disconnects
he from this hypervertex and vice versa. |
protected void |
initialize()
Initializes all the data structures for this element.
|
java.lang.String |
toString()
Returns a human-readable representation of this edge.
|
degree, equals, findEdge, findEdgeSet, getEdges_internal, getEqualVertex, getEquivalentVertex, getIncidentEdges, getIncidentElements, getNeighbors_internal, getNeighbors, isIncident, isNeighborOf, numNeighbors
addGraph_internal, getGraph, hashCode, removeGraph_internal
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum
finalize, getClass, notify, notifyAll, wait, wait, wait
degree, findEdge, findEdgeSet, getEqualVertex, getEquivalentVertex, getIncidentEdges, getNeighbors, isIncident, isNeighborOf, numNeighbors
getGraph, getIncidentElements
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
public ArchetypeVertex copy(ArchetypeGraph g)
ArchetypeVertex
g
. The vertex
created will be equivalent to this vertex: given
v = this.copy(g)
, then
this.getEquivalentVertex(g) == v
, and
this.equals(v) == true
.copy
in interface ArchetypeVertex
copy
in class AbstractArchetypeVertex
g
- the graph in which the copied vertex will be placedArchetypeVertex.copy(edu.uci.ics.jung.graph.ArchetypeGraph)
protected void initialize()
AbstractElement
clone()
copies some information that should
not be in the new element.)initialize
in class AbstractElement
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean connectEdge(Hyperedge e)
Hypervertex
he
to this hypervertex and vice versa.
Does not affect he
's membership in the graph.
Equivalent to calling he.connectVertex(this)
.connectEdge
in interface Hypervertex
Hypervertex.connectEdge(Hyperedge)
public boolean disconnectEdge(Hyperedge e)
Hypervertex
he
from this hypervertex and vice versa.
Does not affect he
's membership in the graph.
Equivalent to calling he.disconnectVertex(this)
.disconnectEdge
in interface Hypervertex
Hypervertex.disconnectEdge(Hyperedge)