|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.ualberta.cs.poker.free.server.DirectedGraph
ca.ualberta.cs.poker.free.server.UndirectedGraph
public class UndirectedGraph
Field Summary |
---|
Fields inherited from class ca.ualberta.cs.poker.free.server.DirectedGraph |
---|
name, nodes |
Constructor Summary | |
---|---|
UndirectedGraph()
|
Method Summary | |
---|---|
void |
addEdge(Node n1,
Node n2)
Adds a directed edge from the source Node to the dest Directed Node |
void |
addEdge(Node n1,
Node n2,
java.lang.Double weight)
|
java.lang.Object |
clone()
|
boolean |
existsEdge(int source_id,
int dest_id)
Determines if a directed edge exists from the source Node to this destination Node |
boolean |
existsEdge(Node n1,
Node n2)
Determines if a directed edge exists from the source Node to this destination Node |
java.util.List |
getRootNodes()
Returns a List containing all the root nodes (i.e. |
void |
removeEdge(Node n1,
Node n2)
Removes the directed edge between the source Node and the destination Node |
void |
removeNode(Node n)
Removes the specified Node and it's associated edges from this DirectedGraph. |
void |
setWeight(Node n1,
Node n2,
java.lang.Double weight)
|
java.lang.String |
toString()
|
Methods inherited from class ca.ualberta.cs.poker.free.server.DirectedGraph |
---|
addNode, dfsVisit, getName, getNode, getRootNode, keyIterator, nodeIterator, setName, size, topologicalSort |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UndirectedGraph()
Method Detail |
---|
public void addEdge(Node n1, Node n2)
DirectedGraph
addEdge
in class DirectedGraph
public void addEdge(Node n1, Node n2, java.lang.Double weight)
addEdge
in class DirectedGraph
public void setWeight(Node n1, Node n2, java.lang.Double weight)
public void removeNode(Node n)
removeNode
in class DirectedGraph
n
- the Node to be removed.public void removeEdge(Node n1, Node n2)
removeEdge
in class DirectedGraph
source
- dest
- public boolean existsEdge(Node n1, Node n2)
existsEdge
in class DirectedGraph
source
- dest
-
public boolean existsEdge(int source_id, int dest_id)
existsEdge
in class DirectedGraph
source_id
- the id of the source Nodedest_id
- the id of the destination Node
public java.util.List getRootNodes()
DirectedGraph
getRootNodes
in class DirectedGraph
public java.lang.Object clone()
clone
in class DirectedGraph
public java.lang.String toString()
toString
in class DirectedGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |