|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.uci.ics.jung.utils.UserData
edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
edu.uci.ics.jung.graph.impl.HypergraphBPG
Implements a hypergraph built over an underlying Bipartite graph, using the equivalence explained in the FAQ. Fully implements the Hypergraph interface; its vertices and edges fully implement their interfaces. Use and create in the standard way; the underlying graph is invisible to the user (but can be extracted with a call to getBipartiteGraphEquivalent() ).
| Nested Class Summary |
| Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer |
UserDataContainer.CopyAction |
| Field Summary | |
static BipartiteGraph.Choice |
EDGE
|
static BipartiteGraph.Choice |
VERTEX
|
| Fields inherited from class edu.uci.ics.jung.utils.UserData |
CLONE, REMOVE, SHARED |
| Fields inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph |
SUBSET_MANAGER |
| Constructor Summary | |
HypergraphBPG()
|
|
| Method Summary | |
Hyperedge |
addEdge(Hyperedge e)
Adds a single edge to the graph |
void |
addUserDatum(java.lang.Object key,
java.lang.Object datum,
UserDataContainer.CopyAction copyAct)
Adds the specified data with the specified key to this object's user data repository, with the specified CopyAction. |
Hypervertex |
addVertex(Hypervertex v)
|
ArchetypeGraph |
copy()
Performs a deep copy of the graph and its contents. |
BipartiteGraph |
getBipartiteGraphEquivalent()
Returns a BipartiteGraph equivalent to this Graph. |
ArchetypeEdge |
getEdgeCorrespondingTo(BipartiteVertex vertex2)
|
java.util.Set |
getEdges()
Returns the set of all edges in the graph. |
java.lang.Object |
getUserDatum(java.lang.Object key)
Retrieves the object in this object's user data repository to which key refers. |
UserDataContainer.CopyAction |
getUserDatumCopyAction(java.lang.Object key)
Retrieves the CopyAction for the object stored in this object's user data repository to which key refers. |
java.util.Iterator |
getUserDatumKeyIterator()
Provides an iterator over this object's user data repository key set. |
ArchetypeVertex |
getVertexCorrespondingTo(BipartiteVertex vertex2)
|
java.util.Set |
getVertices()
Returns a set of all the vertices in the graph. |
void |
importUserData(UserDataContainer udc)
Takes the user data stored in udc and copies it to this object's user data repository, respecting each datum's CopyAction. |
ArchetypeGraph |
newInstance()
Returns a graph of the same type as the graph on which this method is invoked. |
int |
numEdges()
Returns a count of the number of edges in the graph. |
int |
numVertices()
Returns a count of the number of vertices in the graph. |
void |
removeAllEdges()
Removes all edges from this graph, leaving the vertices intact. |
void |
removeAllVertices()
Removes all vertices (and, therefore, edges) from this graph. |
void |
removeEdge(ArchetypeEdge e)
|
void |
removeEdges(java.util.Set edges)
Removes all elements of edges from this graph.
|
java.lang.Object |
removeUserDatum(java.lang.Object key)
Retrieves the object in this object's user data repository to which key refers, and removes it from the repository. |
void |
removeVertex(ArchetypeVertex v)
|
void |
removeVertices(java.util.Set vertices)
Removes all elements of vertices from this graph.
|
void |
setUserDatum(java.lang.Object key,
java.lang.Object datum,
UserDataContainer.CopyAction copyAct)
If key refers to an existing user datum in this object's repository, that datum is replaced by the specified datum. |
| Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph |
addListener, getEdgeConstraints, getVertexConstraints, removeListener, toString |
| Methods inherited from class edu.uci.ics.jung.utils.UserData |
containsUserDatumKey |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph |
addListener, getEdgeConstraints, getVertexConstraints, removeListener |
| Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer |
containsUserDatumKey |
| Field Detail |
public static final BipartiteGraph.Choice VERTEX
public static final BipartiteGraph.Choice EDGE
| Constructor Detail |
public HypergraphBPG()
| Method Detail |
public ArchetypeGraph newInstance()
ArchetypeGraph
newInstance in interface ArchetypeGraphnewInstance in class AbstractArchetypeGraphArchetypeGraph.newInstance()public Hypervertex addVertex(Hypervertex v)
addVertex in interface Hypergraphv - edu.uci.ics.jung.graph.ArchetypeGraph#addVertex(edu.uci.ics.jung.graph.ArchetypeVertex)public Hyperedge addEdge(Hyperedge e)
addEdge in interface Hypergraphe - Hypergraph.addEdge(edu.uci.ics.jung.graph.Hyperedge)public java.util.Set getVertices()
getVertices in interface ArchetypeGraphArchetypeGraph.getVertices()public java.util.Set getEdges()
getEdges in interface ArchetypeGraphArchetypeGraph.getEdges()public int numVertices()
numVertices in interface ArchetypeGraphnumVertices in class AbstractArchetypeGraphArchetypeGraph.numVertices()public int numEdges()
numEdges in interface ArchetypeGraphnumEdges in class AbstractArchetypeGraphArchetypeGraph.numEdges()public void removeVertex(ArchetypeVertex v)
public void removeEdge(ArchetypeEdge e)
public void removeVertices(java.util.Set vertices)
ArchetypeGraphvertices from this graph.
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. Prunes any resultant
ill-formed edges.
removeVertices in interface ArchetypeGraphvertices - the set of vertices to be removedArchetypeGraph.removeVertices(java.util.Set)public void removeEdges(java.util.Set edges)
ArchetypeGraphedges from this graph.
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 ArchetypeGraphArchetypeGraph.removeEdges(java.util.Set)public void removeAllEdges()
ArchetypeGraphremoveEdges(getEdges()).
removeAllEdges in interface ArchetypeGraphArchetypeGraph.removeAllEdges()public void removeAllVertices()
ArchetypeGraphremoveVertices(getVertices()).
removeAllVertices in interface ArchetypeGraphArchetypeGraph.removeAllVertices()public ArchetypeGraph copy()
ArchetypeGraph
copy in interface ArchetypeGraphcopy in class AbstractArchetypeGraphArchetypeGraph.copy()
public void addUserDatum(java.lang.Object key,
java.lang.Object datum,
UserDataContainer.CopyAction copyAct)
UserDataContainer
addUserDatum in interface UserDataContaineraddUserDatum in class UserDatakey - A unique (per type, not per node) key into the informationdatum - The extended information associated with the nodeUserDataContainer.addUserDatum(java.lang.Object, java.lang.Object, edu.uci.ics.jung.utils.UserDataContainer.CopyAction)public void importUserData(UserDataContainer udc)
UserDataContainer
importUserData in interface UserDataContainerimportUserData in class UserDataudc - The UserDataContainer whose user data is being importedUserDataContainer.importUserData(edu.uci.ics.jung.utils.UserDataContainer)public java.util.Iterator getUserDatumKeyIterator()
UserDataContainer
getUserDatumKeyIterator in interface UserDataContainergetUserDatumKeyIterator in class UserDataUserDataContainer.getUserDatumKeyIterator()public UserDataContainer.CopyAction getUserDatumCopyAction(java.lang.Object key)
UserDataContainer
getUserDatumCopyAction in interface UserDataContainergetUserDatumCopyAction in class UserDatakey -
UserDataContainer.getUserDatumCopyAction(java.lang.Object)public java.lang.Object getUserDatum(java.lang.Object key)
UserDataContainer
getUserDatum in interface UserDataContainergetUserDatum in class UserDatakey - UserDataContainer.getUserDatum(java.lang.Object)
public void setUserDatum(java.lang.Object key,
java.lang.Object datum,
UserDataContainer.CopyAction copyAct)
UserDataContainer
setUserDatum in interface UserDataContainersetUserDatum in class UserDatakey - datum - UserDataContainer.setUserDatum(java.lang.Object, java.lang.Object, edu.uci.ics.jung.utils.UserDataContainer.CopyAction)public java.lang.Object removeUserDatum(java.lang.Object key)
UserDataContainer
removeUserDatum in interface UserDataContainerremoveUserDatum in class UserDatakey - UserDataContainer.removeUserDatum(java.lang.Object)public ArchetypeVertex getVertexCorrespondingTo(BipartiteVertex vertex2)
vertex2 -
vertex2public ArchetypeEdge getEdgeCorrespondingTo(BipartiteVertex vertex2)
vertex2 -
vertex2public BipartiteGraph getBipartiteGraphEquivalent()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||