|
|||||||||||
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 ArchetypeGraph
newInstance
in class AbstractArchetypeGraph
ArchetypeGraph.newInstance()
public Hypervertex addVertex(Hypervertex v)
addVertex
in interface Hypergraph
v
- edu.uci.ics.jung.graph.ArchetypeGraph#addVertex(edu.uci.ics.jung.graph.ArchetypeVertex)
public Hyperedge addEdge(Hyperedge e)
addEdge
in interface Hypergraph
e
- Hypergraph.addEdge(edu.uci.ics.jung.graph.Hyperedge)
public java.util.Set getVertices()
getVertices
in interface ArchetypeGraph
ArchetypeGraph.getVertices()
public java.util.Set getEdges()
getEdges
in interface ArchetypeGraph
ArchetypeGraph.getEdges()
public int numVertices()
numVertices
in interface ArchetypeGraph
numVertices
in class AbstractArchetypeGraph
ArchetypeGraph.numVertices()
public int numEdges()
numEdges
in interface ArchetypeGraph
numEdges
in class AbstractArchetypeGraph
ArchetypeGraph.numEdges()
public void removeVertex(ArchetypeVertex v)
public void removeEdge(ArchetypeEdge e)
public void removeVertices(java.util.Set vertices)
ArchetypeGraph
vertices
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 ArchetypeGraph
vertices
- the set of vertices to be removedArchetypeGraph.removeVertices(java.util.Set)
public void removeEdges(java.util.Set edges)
ArchetypeGraph
edges
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 ArchetypeGraph
ArchetypeGraph.removeEdges(java.util.Set)
public void removeAllEdges()
ArchetypeGraph
removeEdges(getEdges())
.
removeAllEdges
in interface ArchetypeGraph
ArchetypeGraph.removeAllEdges()
public void removeAllVertices()
ArchetypeGraph
removeVertices(getVertices())
.
removeAllVertices
in interface ArchetypeGraph
ArchetypeGraph.removeAllVertices()
public ArchetypeGraph copy()
ArchetypeGraph
copy
in interface ArchetypeGraph
copy
in class AbstractArchetypeGraph
ArchetypeGraph.copy()
public void addUserDatum(java.lang.Object key, java.lang.Object datum, UserDataContainer.CopyAction copyAct)
UserDataContainer
addUserDatum
in interface UserDataContainer
addUserDatum
in class UserData
key
- 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 UserDataContainer
importUserData
in class UserData
udc
- The UserDataContainer whose user data is being importedUserDataContainer.importUserData(edu.uci.ics.jung.utils.UserDataContainer)
public java.util.Iterator getUserDatumKeyIterator()
UserDataContainer
getUserDatumKeyIterator
in interface UserDataContainer
getUserDatumKeyIterator
in class UserData
UserDataContainer.getUserDatumKeyIterator()
public UserDataContainer.CopyAction getUserDatumCopyAction(java.lang.Object key)
UserDataContainer
getUserDatumCopyAction
in interface UserDataContainer
getUserDatumCopyAction
in class UserData
key
-
UserDataContainer.getUserDatumCopyAction(java.lang.Object)
public java.lang.Object getUserDatum(java.lang.Object key)
UserDataContainer
getUserDatum
in interface UserDataContainer
getUserDatum
in class UserData
key
- UserDataContainer.getUserDatum(java.lang.Object)
public void setUserDatum(java.lang.Object key, java.lang.Object datum, UserDataContainer.CopyAction copyAct)
UserDataContainer
setUserDatum
in interface UserDataContainer
setUserDatum
in class UserData
key
- 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 UserDataContainer
removeUserDatum
in class UserData
key
- UserDataContainer.removeUserDatum(java.lang.Object)
public ArchetypeVertex getVertexCorrespondingTo(BipartiteVertex vertex2)
vertex2
-
vertex2
public ArchetypeEdge getEdgeCorrespondingTo(BipartiteVertex vertex2)
vertex2
-
vertex2
public BipartiteGraph getBipartiteGraphEquivalent()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |