|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectuchicago.src.sim.topology.graph.AbstractGraph
uchicago.src.sim.topology.graph.DirectedGraph
This represents a DirectedGraph.
| Constructor Summary | |
DirectedGraph(java.util.Set s)
Construct a graph using the specified set of vertices. |
|
DirectedGraph(java.util.Set s,
java.lang.String type)
Construct a graph using the specified set of vertices and the type. |
|
| 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. |
double |
clusterCoeffient()
Calculates the clustering coefficient for this graph. |
int |
degree(java.lang.Object v,
EdgeType type)
Returns the number of edges for the object with the given directionality. |
double |
distance(java.lang.Object element1,
java.lang.Object element2)
This returns the distance between two vertices in the graph. |
boolean |
equals(java.lang.Object oth)
|
java.util.List |
getAdjacentNodes(java.lang.Object v,
double distance,
EdgeType type)
Get a list of the vertices that are attached to the specified vertex of the given direction and within the given distance. |
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. |
protected java.util.Set |
getEdgeSet(java.lang.Object v,
EdgeType e)
|
java.util.List |
getInNodes(java.lang.Object v)
Get all of the vertices that the given vertex has an in edge from. |
java.util.Set |
getNodes()
|
java.util.List |
getOutNodes(java.lang.Object v)
Get all of the vertices that the given vertex has an out edge to. |
int |
hashCode()
|
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. |
boolean |
isAcyclic()
Determines if the graph is acyclic. |
boolean |
isUndirected(Edge e)
Determine if a given edge is directed or undirected. |
java.util.Iterator |
iterator()
Get an iterator for the graph. |
void |
makeUndirected(Edge e)
This makes a directed edge undirected. |
void |
removeEdge(Edge e)
Removes an edge from the graph. |
void |
removeEdge(java.lang.Object e,
java.lang.Object e1)
Remove the edge between the two given vertices. |
boolean |
reverseDirection(Edge e)
Reverse the direction of the edge. |
void |
setDirectionFrom(Edge e,
java.lang.Object v)
This should force the directionality of an edge to be from the passed element. |
int |
size()
Returns the number of vertices in this graph. |
boolean |
topologicalSort()
Sort the nodes of this graph according to topological order. |
| Methods inherited from class uchicago.src.sim.topology.graph.AbstractGraph |
addRelation, getRelations, getRelations, getRelationType, removeRelation, setRelationType |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DirectedGraph(java.util.Set s)
s -
public DirectedGraph(java.util.Set s,
java.lang.String type)
s - type - | Method Detail |
protected java.util.Set getEdgeSet(java.lang.Object v,
EdgeType e)
public void insertEdge(java.lang.Object e,
java.lang.Object e1,
double strength)
insertEdge in interface Graphe - e1 - public void insertEdge(Edge e)
insertEdge in interface Graphe - public void removeEdge(Edge e)
removeEdge in interface Graphe -
public void removeEdge(java.lang.Object e,
java.lang.Object e1)
removeEdge in interface Graphe - e1 - public boolean isUndirected(Edge e)
e -
public boolean reverseDirection(Edge e)
e -
public void setDirectionFrom(Edge e,
java.lang.Object v)
e - v -
public java.util.List getAdjacentNodes(java.lang.Object v,
EdgeType type)
getAdjacentNodes in interface Graphv - type -
public java.util.List getInNodes(java.lang.Object v)
v -
public java.util.List getOutNodes(java.lang.Object v)
v -
public java.util.List getAdjacentNodes(java.lang.Object v,
double distance,
EdgeType type)
getAdjacentNodes in interface Graphv - distance - type -
public boolean areAdjacent(java.lang.Object v,
java.lang.Object v1,
EdgeType type)
areAdjacent in interface Graphv - v1 - type -
public java.util.List getEdges(java.lang.Object v,
EdgeType type)
getEdges in interface Graphv - type -
public int degree(java.lang.Object v,
EdgeType type)
degree in interface Graphv - type -
public java.util.Iterator iterator()
iterator in interface Graph
public double distance(java.lang.Object element1,
java.lang.Object element2)
distance in interface RelationTopologyelement1 - element2 -
public void makeUndirected(Edge e)
uchicago.src.sim.topology.graph.Graph#makeUndirected(uchicago.src.sim.topology.graph.Edge)public int size()
size in interface Graphpublic boolean isAcyclic()
public boolean topologicalSort()
public java.util.Set getNodes()
getNodes in interface Graphpublic int hashCode()
hashCode in class AbstractGraphpublic boolean equals(java.lang.Object oth)
equals in class AbstractGraphpublic double clusterCoeffient()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||