massim.competition2011.scenario
Class GraphGeneratorTriangulationBalanced
java.lang.Object
massim.competition2011.scenario.GraphGenerator
massim.competition2011.scenario.GraphGeneratorTriangulationBalanced
- All Implemented Interfaces:
- java.io.Serializable
public class GraphGeneratorTriangulationBalanced
- extends GraphGenerator
- implements java.io.Serializable
This class is a graph generation that uses an imperfect triangulation algorithm over a grid, with an ad-hoc
Heuristic to improve performance when generating big maps.
- See Also:
- Serialized Form
Method Summary |
void |
generate(java.util.Vector<GraphNode> nodes,
java.util.Vector<GraphEdge> edges,
int nodesNum,
int gridWidth,
int gridHeight,
int cellWidth,
int minNodeWeight,
int maxNodeWeight,
int minEdgeCost,
int maxEdgeCost,
int nodeWeighting,
java.util.Random random)
Generates a graph. |
java.util.HashMap<GraphNode,GraphNode> |
getCounterparts()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GraphGeneratorTriangulationBalanced
public GraphGeneratorTriangulationBalanced()
generate
public void generate(java.util.Vector<GraphNode> nodes,
java.util.Vector<GraphEdge> edges,
int nodesNum,
int gridWidth,
int gridHeight,
int cellWidth,
int minNodeWeight,
int maxNodeWeight,
int minEdgeCost,
int maxEdgeCost,
int nodeWeighting,
java.util.Random random)
- Description copied from class:
GraphGenerator
- Generates a graph.
- Specified by:
generate
in class GraphGenerator
- Parameters:
nodes
- an empty Vector<GraphNode>
where the nodes of the new graph shall be added.edges
- an empty Vector<GraphEdge>
where the edges of the new graph shall be added.nodesNum
- Number of node that the generated graph will have.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getCounterparts
public java.util.HashMap<GraphNode,GraphNode> getCounterparts()
Copyright © 2011. All Rights Reserved.