massim.competition2011.scenario
Class GraphGeneratorTriangulation

java.lang.Object
  extended by massim.competition2011.scenario.GraphGenerator
      extended by massim.competition2011.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

Constructor Summary
GraphGeneratorTriangulation()
           
 
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.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphGeneratorTriangulation

public GraphGeneratorTriangulation()
Method Detail

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


Copyright © 2011. All Rights Reserved.