|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.utils.UserDataDelegate
edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
edu.uci.ics.jung.graph.impl.SetHypergraph
public class SetHypergraph
A basic implementation of Hypergraph
. Edges
and vertices are stored as Set
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph |
---|
AbstractArchetypeGraph.Requirements |
Nested classes/interfaces inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
---|
UserDataContainer.CopyAction |
Field Summary | |
---|---|
protected Set |
edges
|
protected Set |
vertices
|
Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph |
---|
edge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirements |
Fields inherited from class edu.uci.ics.jung.utils.UserDataDelegate |
---|
factory, udc_delegate |
Fields inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph |
---|
SUBSET_MANAGER |
Constructor Summary | |
---|---|
SetHypergraph()
|
Method Summary | |
---|---|
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. |
Set |
getEdges()
Returns a Set view of all edges in this graph. |
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(Set edges)
Removes all vertices in the specified set from g . |
void |
removeVertex(Hypervertex v)
Removes the vertex from this graph. |
void |
removeVertices(Set vertices)
Removes all vertices in the specified set from g . |
Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph |
---|
addAllNotInitializers, addListener, checkConstraints, copy, getEdgeConstraints, getVertexConstraints, listenersExist, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toString |
Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate |
---|
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph |
---|
addListener, copy, getEdgeConstraints, getVertexConstraints, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener |
Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
---|
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum |
Field Detail |
---|
protected Set edges
protected Set vertices
Constructor Detail |
---|
public SetHypergraph()
Method Detail |
---|
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 Set getVertices()
ArchetypeGraph
getVertices
in interface ArchetypeGraph
ArchetypeGraph.getVertices()
public Set getEdges()
ArchetypeGraph
getEdges
in interface ArchetypeGraph
ArchetypeGraph.getEdges()
public void removeVertices(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(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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |