public class SetHypergraph extends AbstractArchetypeGraph implements Hypergraph
Hypergraph. Edges
and vertices are stored as Sets.AbstractArchetypeGraph.RequirementsUserDataContainer.CopyAction| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set |
edges |
protected java.util.Set |
vertices |
edge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirementsfactory, udc_delegateSUBSET_MANAGER| Constructor and Description |
|---|
SetHypergraph() |
| Modifier and Type | Method and Description |
|---|---|
Hyperedge |
addEdge(Hyperedge e)
Adds
e to this graph, and returns
a reference to the added edge. |
Hypervertex |
addVertex(Hypervertex v)
Adds
v to this graph, and returns
a reference to the added vertex. |
java.util.Set |
getEdges()
Returns a Set view of all edges in this graph.
|
java.util.Set |
getVertices()
Returns a Set view of all vertices in this graph.
|
void |
initialize()
Initializes all of the graph's internal data structures.
|
void |
removeEdge(Hyperedge e)
Removes the edge from this graph.
|
void |
removeEdges(java.util.Set edges)
Removes all vertices in the specified set from
g. |
void |
removeVertex(Hypervertex v)
Removes the vertex from this graph.
|
void |
removeVertices(java.util.Set vertices)
Removes all vertices in the specified set from
g. |
addAllNotInitializers, addListener, checkConstraints, copy, getEdgeConstraints, getVertexConstraints, listenersExist, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toStringaddUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatumequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, copy, getEdgeConstraints, getVertexConstraints, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListeneraddUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatumpublic void initialize()
AbstractArchetypeGraph
Note: this method is not a substitute for
removeAllVertices(), as it will not notify the vertices
and edges that they have been removed from the graph.
initialize in class AbstractArchetypeGraphpublic Hypervertex addVertex(Hypervertex v)
Hypergraphv to this graph, and returns
a reference to the added vertex.addVertex in interface HypergraphHypergraph.addVertex(edu.uci.ics.jung.graph.Hypervertex)public void removeVertex(Hypervertex v)
AbstractElement, notifies it that it
has been removed. Disconnects this vertex from any hyperedges to which
it may be connected.removeVertex in interface Hypergraphpublic Hyperedge addEdge(Hyperedge e)
Hypergraphe to this graph, and returns
a reference to the added edge.addEdge in interface HypergraphHypergraph.addEdge(edu.uci.ics.jung.graph.Hyperedge)public void removeEdge(Hyperedge e)
AbstractElement, notifies it that it
has been removed.removeEdge in interface Hypergraphpublic java.util.Set getVertices()
ArchetypeGraphgetVertices in interface ArchetypeGraphArchetypeGraph.getVertices()public java.util.Set getEdges()
ArchetypeGraphgetEdges in interface ArchetypeGraphArchetypeGraph.getEdges()public void removeVertices(java.util.Set vertices)
g. Syntactic
sugar for a loop that calls g.removeVertex on all elements
of the set.
If any element of vertices is not part of this graph,
then throws IllegalArgumentException. If this
exception is thrown, any vertices that may have been removed already
are not guaranteed to be restored to the graph.removeVertices in interface ArchetypeGraphvertices - the set of vertices to be removedpublic void removeEdges(java.util.Set edges)
g. Syntactic
sugar for a loop that calls g.removeVertex on all elements
of the set.
If any element of edges is not part of this graph,
then throws IllegalArgumentException. If this
exception is thrown, any edges that may have been removed already
are not guaranteed to be restored to the graph.removeEdges in interface ArchetypeGraph