|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.multiagent.gamer.ParameterizedObject | +--edu.stanford.multiagent.gamer.graphs.Graph | +--edu.stanford.multiagent.gamer.graphs.ALGraph | +--edu.stanford.multiagent.gamer.graphs.RandomGraph
Generates a random graph with the specified number of nodes and edges. If the sym flag is set, then every time there is an edge from a to b, there will also be an edge from b to a, and the number of edges will really be twice the number specified.
Field Summary |
Fields inherited from class edu.stanford.multiagent.gamer.graphs.ALGraph |
nodes |
Fields inherited from class edu.stanford.multiagent.gamer.graphs.Graph |
nEdges, nNodes, nodeData, pReflexEdges, pSymEdges |
Fields inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
parameters |
Constructor Summary | |
RandomGraph()
|
Method Summary | |
protected void |
checkParameters()
Makes sure that the parameters are in the proper range. |
void |
doGenerate()
Generates a random graph with given parameters. |
protected java.lang.String |
getGraphHelp()
Returns a help information string about the particular graph, does not include parameter information. |
boolean |
hasSymEdges()
Returns true if it must be the case that for every edge a to b there is also an edge b to a |
void |
initialize()
Calls graph initialize and also sets up the nodes Vector. |
void |
randomizeParameters()
Resets range of parameters and randomizes. |
boolean |
reflexEdgesOk()
Returns true if reflexive edges are allowed. |
Methods inherited from class edu.stanford.multiagent.gamer.graphs.ALGraph |
addEdge, addEdge, addNode, areNeighbours, getEdge, getEdges, getNeighbours, getNumNeighbours, removeEdge, removeEdge, setEdgeData |
Methods inherited from class edu.stanford.multiagent.gamer.graphs.Graph |
getHelp, getNEdges, getNNodes, getNodeData, setNodeData |
Methods inherited from class edu.stanford.multiagent.gamer.ParameterizedObject |
getBooleanParameter, getDescription, getDoubleParameter, getLongParameter, getParamDescription, getParameter, getParameters, getStringParameter, setParameter, setParameter, setParameters, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RandomGraph() throws java.lang.Exception
Method Detail |
protected java.lang.String getGraphHelp()
Graph
getGraphHelp
in class Graph
public void initialize() throws java.lang.Exception
initialize
in class Graph
java.lang.Exception
protected void checkParameters() throws java.lang.Exception
checkParameters
in class ALGraph
java.lang.Exception
- if anything is wrong with the parameter
valuespublic boolean hasSymEdges()
hasSymEdges
in class Graph
public boolean reflexEdgesOk()
reflexEdgesOk
in class Graph
public void randomizeParameters()
randomizeParameters
in class ParameterizedObject
public void doGenerate()
doGenerate
in class ParameterizedObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |