|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmas.agentsHempelsSofa.data.graph.Util
public class Util
An implementation of some utility methods which can be helpful for our graph.
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static Edge |
generateRandomEdge(Graph graph,
boolean surveyed)
Generates a random edge |
static Graph |
generateRandomGraph(int numberOfNodes,
int numberOfEdges,
boolean allSurveyed)
Generates a random graph. |
static java.util.LinkedList<AgentToken> |
genereateRandomTokens(int numberOfTokens,
Graph g,
java.lang.String team,
java.lang.String state,
java.lang.String role,
int energy,
int health,
int strength,
int visRange,
int lastInspection)
Generates tokens on graph g |
static Edge |
getRandomEdge(Graph graph)
Gets a random edge of a graph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static Graph generateRandomGraph(int numberOfNodes, int numberOfEdges, boolean allSurveyed)
numberOfNodes
- the number of nodes to generatenumberOfEdges
- the number of edges to generate
public static Edge generateRandomEdge(Graph graph, boolean surveyed)
graph
- the graph the edge shall be created from
public static Edge getRandomEdge(Graph graph)
graph
- the graph the edge shall be picked from
public static java.util.LinkedList<AgentToken> genereateRandomTokens(int numberOfTokens, Graph g, java.lang.String team, java.lang.String state, java.lang.String role, int energy, int health, int strength, int visRange, int lastInspection)
numberOfTokens
- number of tokens to be generatedg
- the graph on which the tokens will be placedteam
- the Team to which the tokens belongstate
- the state of the generated tokensrole
- the role of the generated tokens
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |