public class SetHypergraph extends AbstractArchetypeGraph implements Hypergraph
Hypergraph
. Edges
and vertices are stored as Set
s.AbstractArchetypeGraph.Requirements
UserDataContainer.CopyAction
Modifier and Type | Field and Description |
---|---|
protected java.util.Set |
edges |
protected java.util.Set |
vertices |
edge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirements
factory, udc_delegate
SUBSET_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, toString
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, copy, getEdgeConstraints, getVertexConstraints, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
public 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 AbstractArchetypeGraph
public Hypervertex addVertex(Hypervertex v)
Hypergraph
v
to this graph, and returns
a reference to the added vertex.addVertex
in interface Hypergraph
Hypergraph.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 Hypergraph
public Hyperedge addEdge(Hyperedge e)
Hypergraph
e
to this graph, and returns
a reference to the added edge.addEdge
in interface Hypergraph
Hypergraph.addEdge(edu.uci.ics.jung.graph.Hyperedge)
public void removeEdge(Hyperedge e)
AbstractElement
, notifies it that it
has been removed.removeEdge
in interface Hypergraph
public java.util.Set getVertices()
ArchetypeGraph
getVertices
in interface ArchetypeGraph
ArchetypeGraph.getVertices()
public java.util.Set getEdges()
ArchetypeGraph
getEdges
in interface ArchetypeGraph
ArchetypeGraph.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 ArchetypeGraph
vertices
- 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