|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This represents a more specific RelationTopology, where relationships are represented by edges. This provides support for directed or non-directed edges. While this does imply a particular implementation approach for concrete implementations, the primary goal of this was to semantically represent a collection of relationships which adhere to a graph structure, such as a Social Network, not to impose any syntactic implementation requirements.
| Method Summary | |
boolean |
areAdjacent(java.lang.Object v,
java.lang.Object v1,
EdgeType type)
Returns whether the two elements share an edge with the given directionality. |
int |
degree(java.lang.Object v,
EdgeType type)
Returns the number of edges for the object with the given directionality. |
java.util.List |
getAdjacentNodes(java.lang.Object v,
double distance,
EdgeType type)
|
java.util.List |
getAdjacentNodes(java.lang.Object v,
EdgeType type)
Get the Nodes that share an edge with the parameter with the proper directionality. |
java.util.List |
getEdges(java.lang.Object v,
EdgeType type)
Returns the edge objects of the given directionality for the object. |
java.util.Set |
getNodes()
|
void |
insertEdge(Edge e)
Insert an edge that has already been created. |
void |
insertEdge(java.lang.Object e,
java.lang.Object e1,
double strength)
Insert a new edge into the graph. |
java.util.Iterator |
iterator()
Get an iterator for the graph. |
void |
removeEdge(Edge e)
Removes an edge from the graph. |
void |
removeEdge(java.lang.Object e,
java.lang.Object e1)
|
int |
size()
|
| Methods inherited from interface uchicago.src.sim.topology.ModifyableTopology |
addRelation, removeRelation |
| Methods inherited from interface uchicago.src.sim.topology.RelationTopology |
distance, getRelations, getRelationType, setRelationType |
| Method Detail |
public void insertEdge(java.lang.Object e,
java.lang.Object e1,
double strength)
e - e1 - public void insertEdge(Edge e)
e - public void removeEdge(Edge e)
e -
public void removeEdge(java.lang.Object e,
java.lang.Object e1)
e - e1 -
public java.util.List getAdjacentNodes(java.lang.Object v,
EdgeType type)
v - type -
public java.util.List getAdjacentNodes(java.lang.Object v,
double distance,
EdgeType type)
v - distance - type -
public boolean areAdjacent(java.lang.Object v,
java.lang.Object v1,
EdgeType type)
v - v1 - type -
public java.util.List getEdges(java.lang.Object v,
EdgeType type)
v - type -
public int degree(java.lang.Object v,
EdgeType type)
v - type -
public java.util.Iterator iterator()
public int size()
public java.util.Set getNodes()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||