massim.competition2012.scenario
Class GraphGeneratorTriangulation
java.lang.Object
massim.competition2012.scenario.GraphGenerator
massim.competition2012.scenario.GraphGeneratorTriangulation
- All Implemented Interfaces:
- java.io.Serializable
public class GraphGeneratorTriangulation
- 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,
java.util.Random random,
int randomWeight,
int gradientWeight,
int optimaWeight,
int blurIterations,
int optimaPercentage)
Generates a graph. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GraphGeneratorTriangulation
public GraphGeneratorTriangulation()
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,
java.util.Random random,
int randomWeight,
int gradientWeight,
int optimaWeight,
int blurIterations,
int optimaPercentage)
- 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
Copyright © 2012. All Rights Reserved.